【发布时间】:2015-07-23 00:12:29
【问题描述】:
我是新手。所以我可能会犯一些愚蠢的错误。 在我的 .htaccess 中,我编写了如下的 RewriteRule:
RewriteRule ^contactus$ /contact.php [L,B]
如果我的网址是http://localhost/contactus,那么它工作正常。
如果我的网址是http://localhost/countryname/contactus,那么它也可以正常工作。
但是当 url 像 http://localhost/songs/Bob+Marley+%26+The+Wailers/One+Love/contactus 时,页面不会重定向
请帮忙。
【问题讨论】:
-
这个网址应该重定向到哪里?
-
它只是替换了最后一部分。
-
您能出示您的完整 .htaccess 吗?
标签: php apache .htaccess mod-rewrite