2012-10-19 60 views
-1

我已經創建了下面的代碼.htaccess文件:谷歌重定向所有搜索結果到我的主頁

rewriteengine on 
rewritecond %{HTTP_HOST} ^example.com$ 
rewriterule ^hie\/ "http\:\/\/www\.example\.com\/" [R=301,L] #5060c69211a2d 
ErrorDocument 404 http://www.example.com/redirect.html 

谷歌,出於某種原因,被重定向我的所有網頁所出現在搜索結果中的我主頁。

我不知道爲什麼發生這種情況,Bing和雅虎搜索結果中正常工作。我意識到谷歌有鏈接到我的網頁作爲「example.com/siding/example.html」不是「www.example.com/siding/example.html」。

我不知道爲什麼也不知道如何解決它。有任何想法嗎?

回答

0

你可能想您的規則更改爲:

rewriterule^http://www.example.com%{REQUEST_URI} [R=301,L]