24小时服务热线:18611114026

使用伪静态规则拦截蜘蛛访问

编辑:新互动    浏览次数:次    更新时间:2013-11-03 00:03    文章来源:http://www.xinhudong.com.cn

Linux下 规则文件.htaccess(手工创建.htaccess文件到站点根目录)

<IfModule mod_rewrite.c>
RewriteEngine On
#Block spider
RewriteCond %{HTTP_USER_AGENT} "Webdup|AcoonBot|AhrefsBot|Ezooms|EdisterBot|EC2LinkFinder|jikespider|Purebot|MJ12bot
|WangIDSpider|WBSearchBot|Wotbox|xbfMozilla|Yottaa|YandexBot|Jorgee|SWEBot|spbot|TurnitinBot-Agent|mail.RU|curl|perl
|Python|Wget|Xenu|ZmEu" [NC]
RewriteRule !(^robots\.txt$) - [F]
</IfModule>

windows下 规则文件httpd.conf   (在虚拟主机控制面板中用 “ISAPI筛选器自定义设置 "  开启自定义伪静态 Isapi_Rewite3.1 )

 

#Block spider
RewriteCond %{HTTP_USER_AGENT} "Webdup|AcoonBot|AhrefsBot|Ezooms|EdisterBot|EC2LinkFinder|jikespider|Purebot|MJ12bot
|WangIDSpider|WBSearchBot|Wotbox|xbfMozilla|Yottaa|YandexBot|Jorgee|SWEBot|spbot|TurnitinBot-Agent|mail.RU|curl|perl
|Python|Wget|Xenu|ZmEu" [NC]
RewriteRule !(^/robots\.txt$) - [F]


注:规则中默认屏蔽部分不明蜘蛛,要屏蔽其他蜘蛛按规则添加即可
附各大蜘蛛名字:
google蜘蛛: googlebot
百度蜘蛛:
baiduspider
yahoo
蜘蛛:
slurp
alexa
蜘蛛:
ia_archiver
msn
蜘蛛:
msnbot
bing
蜘蛛:
bingbot
altavista
蜘蛛:
scooter
lycos
蜘蛛:
 lycos_spider_(t-rex)
alltheweb
蜘蛛:
 fast-webcrawler
inktomi
蜘蛛:
 slurp
有道蜘蛛:YodaoBot
OutfoxBot
热土蜘蛛:
Adminrtspider
搜狗蜘蛛:
sogou spider
SOSO
蜘蛛:
sosospider
360
搜蜘蛛:360spider

  • 欢迎通过在线留言联系我们,24X7小时为您服务!
  • 您可以通过这里提交需求给我们,请填写完整,这样我们能很快地了解您的网站制作需求,您所填写的信息将严格保密!