PDA

查看完整版本: 已解決 vBET +的lighttpd +百度推廣



valsha
18-02-10, 11:23
問:怎麼樣的。htaccess中的lighttpd +百度推廣?

你的規則適用於 Apache。htaccess的:(沒有任何規則的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]

百度推廣 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"
)
}

怎麼樣的規則為:
1。的lighttpd +百度推廣 + vbet
2。 nginx的+百度推廣 + vbet

謝謝。

vBET
18-02-10, 13:14
我們可以為您提供這樣的規則基礎上vBEO規則 - 這意味著經過測試。它應該工作,但我們不能肯定沒有測試。有興趣?

valsha
18-02-10, 16:04
有興趣?
是的,請。

vBET
19-02-10, 00:08
OK等。下面是lighttpd的規則沒有測試。請讓我們知道它和它的作品(如果你PM我訪問細節,比如一些測 試,我可以給你測試,並確定解決方案)。



$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"
)
}


假定有這個論壇使用子目錄論壇,網址。如果沒有請刪除所有/論壇,你看到的。我想是這樣;)很抱歉 - 但它不是我寫的測試。希望這是工作。請備份您的實際規則之前所做的更改。

valsha
19-02-10, 00:51
我看到的變化,但是怎麼樣:

"^/forums/(.+)\?(.*)$" => "/forums/vbseo.php?$2",
"^/forums/(.+)$" => "/forums/vbseo.php"
它不需要任何更多的?

vBET
19-02-10, 01:28
我看到的變化,但是怎麼樣:

"^/forums/(.+)\?(.*)$" => "/forums/vbseo.php?$2",
"^/forums/(.+)$" => "/forums/vbseo.php"
它不需要任何更多的?

號這是思想vbenterprisetranslator_seo.php就像過濾器vbseo.php這是某種類型的前端控制器。所以現在一切順利槽vbenterprisetranslator_seo.php這使得準備 vBET然後包括vbseo.php

如果你要玩其他的規則引擎 - 這些都是規則的規則:
- 創建 2規則的翻譯(主頁等)
- 創建規則的確切情況,但如為 vbseo.php指向vbenterprisetranslator_seo.php

valsha
19-02-10, 13:52
謝謝,我試試這個代碼。我在這裡後我的結果。

Automatic Translations (Powered by Google, Microsoft®, Yandex, SDL Language Cloud, IBM Watson and Apertium):
AfrikaansAlbanianArabicBelarusianBulgarianCatalanChineseCroatianCzechDanishDutchEnglishEstonianFilipinoFinnishFrenchGalicianGermanGreekHaitian CreoleHebrewHindiHungarianIcelandicIndonesianIrishItalianJapaneseKoreanLatvianLithuanianMacedonianMalayMalteseNorwegianPersianPolishPortugueseRomanianRussianSerbianSlovakSlovenianSpanishSwahiliSwedishTaiwaneseThaiTurkishUkrainianVietnameseWelshYiddish
Thanks to vBET 4.10.1 enjoy automatic translations