PDA

View Full Version : Solved vBET+lighttpd+vbseo



valsha
18-02-10, 11:23
Q. what about .htaccess in lighttpd+vbseo?

Your rules for apache .htaccess: (no any rules for lighttpd)

#RULES for SEO translation links with vbSEO (have to be included before all rules to vbseo.php)
#RewriteRule ^/?(af|sq|ar|be|bg|ca|zh-CN|hr|cs|da|nl|en|et|tl|fi|fr|gl|de|el|iw|hi|hu|is|id|ga|it|ja|ko|lv|lt|mk|ms|mt|no|fa|pl|pt|ro|ru|sr|sk|sl|es|sw|sv|zh-TW|th|tr|uk|vi|cy|yi)/$ vbenterprisetranslator_seo.php?vbet_lang=$1&redirected=/index.php [L,QSA]
#RewriteRule ^/?(af|sq|ar|be|bg|ca|zh-CN|hr|cs|da|nl|en|et|tl|fi|fr|gl|de|el|iw|hi|hu|is|id|ga|it|ja|ko|lv|lt|mk|ms|mt|no|fa|pl|pt|ro|ru|sr|sk|sl|es|sw|sv|zh-TW|th|tr|uk|vi|cy|yi)/(.*)?$ vbenterprisetranslator_seo.php?vbet_lang=$1&redirected=/$2 [L,QSA]

#RewriteCond %{REQUEST_URI} !(admincp/|modcp/|vbseo_sitemap/|cron)
#RewriteRule ^((archive/)?(.*\.php(/.*)?))$ vbenterprisetranslator_seo.php [L,QSA]

#RewriteCond %{REQUEST_FILENAME} !-f
#RewriteCond %{REQUEST_FILENAME} !-d
#RewriteCond %{REQUEST_FILENAME} !^(admincp|modcp|clientscript|cpstyles|images)/
#RewriteRule $ vbenterprisetranslator_seo.php [L,QSA]

vBSEO rules for lighttpd:

$HTTP["host"] == "yourdomain.com" {
server.document-root = "/path/to/your/public_html/"
url.rewrite-once = (
"^/forums/(sitemap.*\.(xml|txt)(\.gz)?)$" => "/forums/vbseo_sitemap/vbseo_getsitemap.php?sitemap=$1",
"^(/forums/(admincp|modcp|clientscript|cpstyles|images|customavatars)/.*)$" => "$1",
"^(/favicon\.ico|/robots\.txt|.*clear\.gif)$" => "$1",
"^/forums/(.+)\?(.*)$" => "/forums/vbseo.php?$2",
"^/forums/(.+)$" => "/forums/vbseo.php"
)
}

What about rules for:
1. lighttpd+vbseo+vbet
2. nginx+vbseo+vbet

Thank you.

vBET
18-02-10, 13:14
We can provide you such rules basing on vBEO rules - it means without testing. It should work, but we cannot be sure without tests. Interested?

valsha
18-02-10, 16:04
Interested?
yes, please.

vBET
19-02-10, 00:08
OK so. Below is not tested rule for lighttpd. Please check it and let us know does it works (if you PM me access details to some testing instance I can test it and give you sure solution).



$HTTP["host"] == "yourdomain.com" {
server.document-root = "/path/to/your/public_html/"
url.rewrite-once = (
"^/forums/(sitemap.*\.(xml|txt)(\.gz)?)$" => "/forums/vbseo_sitemap/vbseo_getsitemap.php?sitemap=$1",
"^/forums/(af|sq|ar|be|bg|ca|zh-CN|hr|cs|da|nl|en|et|tl|fi|fr|gl|de|el|iw|hi|hu|is|id|ga|it|ja|ko|lv|lt|mk|ms|mt|no|fa|pl|pt|ro|ru|sr|sk|sl|es|sw|sv|zh-TW|th|tr|uk|vi|cy|yi)/$" => "/forums/vbenterprisetranslator_seo.php?vbet_lang=$1&redirected=/forums/",
"^/forums/(af|sq|ar|be|bg|ca|zh-CN|hr|cs|da|nl|en|et|tl|fi|fr|gl|de|el|iw|hi|hu|is|id|ga|it|ja|ko|lv|lt|mk|ms|mt|no|fa|pl|pt|ro|ru|sr|sk|sl|es|sw|sv|zh-TW|th|tr|uk|vi|cy|yi)/(.*)?$" => "/forums/vbenterprisetranslator_seo.php?vbet_lang=$1&redirected=/forums/$2",
"^(/forums/(admincp|modcp|clientscript|cpstyles|images|customavatars)/.*)$" => "$1",
"^(/favicon\.ico|/robots\.txt|.*clear\.gif)$" => "$1",
"^/forums/(.+)\?(.*)$" => "/forums/vbenterprisetranslator_seo.php?$2",
"^/forums/(.+)$" => "/forums/vbenterprisetranslator_seo.php"
)
}


It is assumed there that forum uses subdirectory forums in URL. If not please remove all /forums which you see. I think so ;) Sorry - but as I wrote it was not tested. Hope it is working. Please backup your actual rules before made changes.

valsha
19-02-10, 00:51
I see changes, but what about:

"^/forums/(.+)\?(.*)$" => "/forums/vbseo.php?$2",
"^/forums/(.+)$" => "/forums/vbseo.php"
it's no need any more?

vBET
19-02-10, 01:28
I see changes, but what about:

"^/forums/(.+)\?(.*)$" => "/forums/vbseo.php?$2",
"^/forums/(.+)$" => "/forums/vbseo.php"
it's no need any more?

No. This is the idea vbenterprisetranslator_seo.php acts like filter for vbseo.php which is some kind of front controller. So everything goes now trough vbenterprisetranslator_seo.php which makes preparation for vBET and then includes vbseo.php

If you want to play with rules for other engines - those are rules of rules:
- create 2 rules for translations (for main page and others)
- create rules for exact conditions like for vbseo.php but pointing to vbenterprisetranslator_seo.php

valsha
19-02-10, 13:52
Thank you, i try this code. I post here my results.

AfrikaansAlbanianArabicBelarusianBulgarianCatalanChineseCroatianCzechDanishDutchEnglishEstonianFilipinoFinnishFrenchGalicianGermanGreekHaitian CreoleHebrewHindiHungarianIcelandicIndonesianIrishItalianJapaneseKoreanLatvianLithuanianMacedonianMalayMalteseNorwegianPersianPolishPortugueseRomanianRussianSerbianSlovakSlovenianSpanishSwahiliSwedishTaiwaneseThaiTurkishUkrainianVietnameseWelshYiddish
Translated to other languages supported by vB Enterprise Translator 4.10.1