虚拟主机域名注册-常见问题虚拟主机问题 → 虚拟主机问题


使用伪静态规则拦截蜘蛛访问
作者:系统管理员

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

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>

windows2003下 规则文件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]

windows2008下 web.config

<rule name="Block spider">
      <match url="(^robots.txt$)" ignoreCase="false" negate="true" />
      <conditions>
        <add input="{HTTP_USER_AGENT}" pattern="Webdup|AcoonBot|AhrefsBot|Ezooms|EdisterBot|EC2LinkFinder|jikespider|Purebot|MJ12bot" ignoreCase="false" />
      </conditions>
      <action type="CustomResponse" statusCode="403" statusReason="Forbidden" statusDescription="Forbidden" />
</rule>



注:规则中默认屏蔽部分不明蜘蛛,要屏蔽其他蜘蛛按规则添加即可
附各大蜘蛛名字:
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


 



来源: 网络
阅读:1063
日期:2014-08-19

【 双击滚屏 】 【 推荐朋友 】 【 收藏 】 【 打印 】 【 关闭 】 【 字体: 】 
上一篇:window2008系统iis7.5下虚拟主机设置防盗链
下一篇:windows2008+iis7,无组件上传写入文件失败,ADODB.Stream 错误 800a0
  >> 相关文章