.htaccess 谷歌将所有搜索结果重定向到我的主页

.htaccess 谷歌将所有搜索结果重定向到我的主页,.htaccess,redirect,indexing,.htaccess,Redirect,Indexing,我使用以下代码创建了一个.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 出于某种原因,谷歌正在将搜索结果中出现的我的所有页面重定向到我的主页 我不

我使用以下代码创建了一个.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和yahoo的搜索结果运行良好。我意识到谷歌将我的页面链接为“example.com/siding/example.html”,而不是“www.example.com/siding/example.html”


我不知道为什么,也不知道如何修复它。有什么想法吗

您可能希望将规则更改为:

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