2012-10-19 64 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]