简体   繁体   English

重定向 301 和动态搜索页面生成

[英]Redirect 301 and dynamic search pages generated

I did some redirects 301 from my old domain to a new domain on new host.我做了一些重定向 301 从我的旧域到新主机上的新域。 It works well, but I'm having a lot of 404's on google webmasters generated by dynamic search pages.它运行良好,但我在动态搜索页面生成的谷歌网站管理员上有很多 404。 Eg: www.newdomain.com/store/catalogsearch/result/index/?cat=60&dir=desc&limit=15&mod‌​e=grid&order=price&p=2&q=makita.例如:www.newdomain.com/store/catalogsearch/result/index/?cat=60&dir=desc&limit=15&mod‌ e=grid&order=price&p=2&q=makita。 But, I think this was crawled in the old domain, because of the searched words and are redirecting now to the new domain.但是,我认为这是在旧域中抓取的,因为搜索到的词现在正在重定向到新域。 Is there some generic rule to redirect all the others dynamic generated searchs to a specific page like home page on new domain without drop my ranking on google?是否有一些通用规则可以将所有其他动态生成的搜索重定向到特定页面,例如新域上的主页,而不会降低我在 google 上的排名? On my new domain, dynamic search pages have been blocked in robots.txt.在我的新域中,robots.txt 中的动态搜索页面已被阻止。 Is this way enough to not be crawled again?这样就可以不再被抓取了吗? This is part of my redirect:这是我重定向的一部分:

Options +FollowSymLinks
RewriteEngine on
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /([^/]+/)*(default|index)\.(html|php|htm)\ HTTP/ [NC]
RewriteRule ^(([^/]+/)*)(default|main|index)\.(html|php|htm)$ http://www.newdomain.com/$1 [R=301,NC]
RewriteRule ^store/?$ http://www.newdomain.com [L,NC,R=301]
RewriteRule ^store/folder/?$ http://www.newdomain.com.br/otherfolder/another-folder/ [L,NC,R=301]
RewriteRule ^store/folder1/folder2/?$ http://www.newdomain.com/folder-3/folder-4 [L,NC,R=301]
...
RewriteCond %{HTTP_HOST} ^(www\.)?olddomain\.com$ [NC]
RewriteRule ^(.*)$ http://www.newdomain.com/$1 [R=301,NE,L]

Thanks in advance for your help.在此先感谢您的帮助。

ok insert this rule just below RewriteEngine On to redirect these dynamic URLs to home page of new domain:好的,在RewriteEngine On下方插入此规则以将这些动态 URL 重定向到新域的主页:

RewriteCond %{THE_REQUEST} /store/catalogsearch/result/index/ [NC]
RewriteRule ^ http://www.newdomain.com/? [L,R=301]

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM