想我再也网址如何重写一个URL的一部分
http://www.example.com/se/products/details/23
http://www.example.com/se/company/about
http://www.example.com/se/customers/europe/john-doe
etc.
我希望他们rewrite
到
http://www.example.com/en/products/details/23
http://www.example.com/en/company/about
http://www.example.com/en/customers/europe/john-doe
etc
这意味着不管用什么语言自带他们rewrited到en
,他们看到他们各自的语言在地址栏中,但页面正在从服务器'en'
我的规则是这样的
# Pass through the original path as a query parameter, and retain the existing parameters.
RewriteCond %{REQUEST_URI} ^(.*)$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule .* framework/main.php?url=%1 [QSA]
RewriteRule ^se/(.+?)\/?$ /en/$1 [L]
该项目基于SilverStripe
框架。
而且这也没有工作,显示404页未找到错误
我们怎样才能做到这一点?
“这没有工作”。怎么了?你能告诉我们重写日志吗? – undone
@undone,它显示404页未找到错误 – WatsMyName
如何重写日志?你可以把日志放在这里吗? – undone