我使用301從非WWW重定向到WWW域!工作正常,但鏈接不同。(.htaccess)301重定向到相同的url結構
例子:
from - ggkj.com/posts/godzilla/43
to - www.ggkj.com/index.php?view=posts&author=godzilla&aid=43
我的.htaccess 301重定向代碼:
RewriteEngine On
RewriteBase/
RewriteCond %{HTTP_HOST} !^www\.example\.com [NC]
RewriteRule ^(.*) http://www.example\.com/$1 [L,R=301]
的.htaccess代碼:http://pastebin.com/t3FA59uq
不適合我! :/你100%確定? – aainaarz
我在我的所有項目中都使用它,並且工作正常。 – Sangar82
嗯,我不知道.htaccess - 我使用它,因爲我需要301! :D這是我的! http://pastebin.com/t3FA59uq – aainaarz