如何重定向一个url来编写链接“index.ph”中的拼写错误?

时间:2015-01-13 22:46:01

标签: .htaccess rewrite

我的同事发送了一些链接到URL的材料,如:www.oursite.com/important/index.ph

我想将该确切的网址重定向到正确的网址:

www.oursite.com/important/index.php

不要弄乱原始网址。我该怎么做?

1 个答案:

答案 0 :(得分:0)

您可以在DOCUMENT_ROOT/.htaccess文件中使用此代码:

RewriteEngine On

RewriteRule ^(important/index\.ph)$ /$1p [L,NC,R=302]
相关问题