0
我已經有一對夫婦的規則設置,如爲什麼我的重定向301不起作用?
RewriteCond %{HTTP_HOST} ^www.pipcanadaltd\.com$ [NC]
RewriteRule .?$ http://ca.pipglobal.com%{REQUEST_URI} [R=301,L]
而且我也有幾個PHP頁面如重寫:
RewriteRule ^products/eye-protection-experts/$ prod-expert-eyewear.php [NC,L]
出於某種原因,當我去創造一個更簡單的301重定向,它不工作。這裏是我有:
RewriteRule ^products/construction-channel-experts/$ ^products/construction-safety-solutions/ [R=301]
我真的很困惑,爲什麼這是行不通的。
好吧我試過這個,但我仍然得到一個404,所以可能有配置問題。 – timrosenthal
試試:'RewriteRule^products/construction-channel-experts /?$ products/construction-safety-solutions/[R = 301,L,NC]'(假設你有上面定義的'RewriteBase') – anubhava