2017-02-17 167 views
1

我有谷歌索引問題。 的問題是,谷歌索引我所有的頁面,如xx.com/ilan.php?ilan=test 還收錄像xx.com/test.html 但我想谷歌索引我的網頁像xx.com/test.htmlURL重定向/使用.htaccess重寫

我創建了一個的.htaccess並將其插入到上面的代碼

Options +FollowSymLinks 
RewriteEngine on 
RewriteRule (.*)\.html$ ilan.php?ilan=$1 

問題是如何擺脫這個問題?我想用301但我找不到解決方案。

回答

0

添加[R=301]RewriteRule

RewriteRule (.*)\.html$ ilan.php?ilan=$1 [R=301] 
+0

當我做出這個樣子,所有的URL重定向到ilan.php?宜蘭= –

+0

應該顛覆 –