求在http.conf下屏蔽userAgent的方法
主要就是想屏蔽掉某些蜘蛛,robots.txt对它们没用,照样爬。所以就想在Http.conf对这个服务器做屏蔽,也不想用.htaccess,站太多。测了下面这两种,均无效。[code]<directory "/www/">
Order allow,deny
Allow from all
BrowserMatchNoCase "YandexBot" badguy
SetEnvIfNoCase User-Agent "^Ahref" badguy
deny from env=badguy
</directory>[/code] 没实际用过,确定设置正确,应该是没有问题的
页:
[1]