Redirect 301 /features/blahblah.php http://www.mysite.com/articles/blahblah1.php
结果在http://www.mysite.com/articles/blahblah1.php?q=features/blahblah.php这是404错误页面未找到。重定向301 - 为什么我的旧网址被追加到我的新网址导致404错误?
所以我在做什么错在这里
Redirect 301 /features/blahblah.php http://www.mysite.com/articles/blahblah1.php
结果在http://www.mysite.com/articles/blahblah1.php?q=features/blahblah.php这是404错误页面未找到。重定向301 - 为什么我的旧网址被追加到我的新网址导致404错误?
所以我在做什么错在这里
http://httpd.apache.org/docs/2.0/mod/mod_alias.html#redirect文件究竟发生了什么。
你可能想使用RedirectMatch,像:
RedirectMatch ^/features/blahblah.php http://www.mysite.com/articles/blahblah1.php
如果你希望它是一个“永久”,与HTTP状态301(可以是理想的搜索引擎优化的目的)重定向,而不是暂时性302重定向,然后改用:
RedirectMatch permanent ^/features/blahblah.php http://www.mysite.com/articles/blahblah1.php
相关新闻
RedirectMatch永久^ /功能/ blahblah.php HTTP(*): //www.mysite.com/articles/blahblah1.php导致相同的ht TP://www.mysite.com/articles/blahblah1.php Q =特征/ blahblah.php – robert 2011-04-11 15:32:35
,有人可以给我提供一个很好的资源htaccess的相关的东西一样^等等 – robert 2011-04-11 15:00:15