1
我使用MediaWiki與多語言子頁面。試圖使用.htaccess規則重定向到加載FR內容W/FR域和EN內容W/EN域
當我去「english.com/Page_title」我想這一點(這是默認值)
當我去「french.com/Page_title」我要加載/ FR子頁面加載,這是 「french.com/Page_title/fr」
,這裏是我目前的規則:
RewriteBase/
RewriteRule ^[^:]*\.(php|src|jpg|jpeg|png|gif|css|js|inc|swf|flv|phtml|pl|ico|html|shtml|zip|rar|svg|eot|ttf|woff)$ - [L,NC]
RewriteRule ^index.php?title - [L]
RewriteRule ^(.*)\&(.*)$ /wiki/index.php?title=$1\%26$2 [L,QSA]
RewriteCond %{REQUEST_URI} (//+)
RewriteRule ^(.*)/(.*)$ /wiki/index.php?title=$1%1$2 [L,QSA]
RewriteRule ^(.+)$ /wiki/index.php?title=$1 [L,QSA]
RewriteRule ^/*$ /wiki/index.php?title=Main_Page [L,QSA]
我已經玩弄各種Rewrit eCond和規則,但無法讓它工作,總是無休止的重定向或500's。
您是如何設置MediaWiki以確定從請求中使用哪種語言的?它是查看原始請求路徑,還是從查詢字符串中獲取信息? – 2010-08-24 20:52:33