【发布时间】:2012-12-14 17:53:19
【问题描述】:
当有人想要test.php to newpage.php时,我需要重定向。
我的 htaccess 包含:
Options All -Indexes
RewriteEngine on
RewriteRule ^contact.shtml$ contact.php [NC]
RewriteRule ^news/(.*)/(.*)$ news_main.php?id=$1&title=$2 [L]
Redirect /test.php http://mydomain.com/newpage.php
但它不起作用。这里有什么问题吗?如果是我们,请帮助我。
【问题讨论】:
-
我看不到您要重定向的位置。为什么你认为你的代码应该重定向?
-
请仔细检查httpd.apache.org/docs/current/mod/mod_alias.html#redirect - 并放在 RewriteEngine 部分上方。