1
我正在寻找在我们的网站使用mod重写语言开关。而不是显示:modrewrite语言参数
https://www.website.com/rest/of/my-site?lang=it
https://www.website.com/en/rest/of/my-site
问题出现在这里。 甲我们目前的国防部重写配置:
# General rewrites
RewriteRule -p([0-9]+)\.html$ index.php?module=page&id=$1&%{QUERY_STRING} [L]
RewriteRule (news|nieuws)/(.*)\.html$ index.php?module=news&url_raw=$2&%{QUERY_STRING} [L]
RewriteRule (.*)\.html$ index.php?module=page&url_raw=$1&%{QUERY_STRING} [L]
#rewriteRule contact(/|)$ index.php?module=contact&%{QUERY_STRING} [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule (.*)$ index.php?module=page&url_raw=$1&%{QUERY_STRING} [L]
乙国防部重写和PHP片断 当国防部重写工作的用户应该能够从
- website.com/en/rest切换/的/我的现场
- website.com/it/rest/of/my-site
而不是
- website.com/en/rest/of/my-site?lang=it
我尝试了好几种选项(language parameter rewrite with mod_rewrite),但我不与它来远远不够。
是请求总是指向website.com/en如果不是其他区域?这意味着,我们可以依靠第一个文件夹代表语言环境的事实吗? – LucasF 2014-12-19 00:02:47
是的,这是正确的。 Al/en,/等等都指向同一个文件夹。 – Influenist 2014-12-20 14:59:15