【发布时间】:2011-05-16 12:44:49
【问题描述】:
我已经查看了相关问题,但没有运气。
我正在尝试重写如下内容:http://www.example.com/v2/index.php/en/company/careers/training-and-implementation-specialist/
对此:http://www.example.com/en/company/careers/training-and-implementation-specialist/
为了让事情更加混乱,上面 URL 中的“index.php”是一个文件,而不是一个目录。我正在尝试制定一个规则,将 www.example.com/v2/index.php/(anything) 变成 www.example.com/(anything)
我觉得这应该很容易,我尝试了这个:RewriteRule ^v2/index.php/(.*) /$1 [L]
但没有运气——我在 /v2/index.php 中尝试的任何东西都会得到 404。
有什么建议吗?
【问题讨论】:
标签: apache mod-rewrite redirect