【发布时间】:2015-07-13 17:22:43
【问题描述】:
我写了一个 .htaccess 重写规则,它应该接受容器 index.cfm 的任何请求并将它们重定向到 index.php。
http://testsite.com/index.cfm/a/catalog.prodShow/vid/42110/catid/154
但是,它没有正确重定向。如果我只是输入 index.cfm(没有其余的 url)它可以正常工作,但是,当 /a/... 添加到它时,它会将我带到 404 页面。
如何调整我的规则,使其适用于任何包含 index.cfm 的网址?
这是我的规则:
重写规则 ^index.cfm$ /index.php [L,NC,R]
谢谢。
【问题讨论】:
标签: apache .htaccess mod-rewrite redirect