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