[英]How to Rewrite urls if not ends with language id or country id in .htaccess
[英]how to write my htaccess code to rewrite multi country and language
如何編寫我的htaccess代碼以重寫多國語言
我在htaccess中工作了一周。 現在,我的公司希望設計一個具有多個國家和語言設置的商業網站。 需要幫忙 。
http://ca.hello.com/en
=>
http://www.hello.com/?country=ca&language=en
------------------------
http://ca.hello.com/en/help.html
=>
http://www.hello.com/index.php?main_page=help&country=ca&language=en
我沒有測試它,但是嘗試一下,讓我知道它是否不起作用
Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTP_HOST} ^([^.]+)\.hello\.com
RewriteRule ^(.*)/?(.*)?[.html]$ http://www.hello.com/index.php?main_page=$2&country=%1&language=$1 [L]
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.