服务器在Apache上运行,并试图阻止libwww-perl,但不确定它为什么不能工作。我已经将以下内容放入了我的.htaccess中,但是当我运行测试时,仍然会收到libwww-perl仍未被阻止的通知。
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_USER_AGENT} libwww-perl.*
RewriteRule .* – [F,L]我看了这篇文章,如何创建.htaccess并阻止UserAgent libwww-perl?
但是他们似乎在运行IIS7,所以我认为答案并不适用。
我试着补充说:
SetEnvIfNoCase User-Agent "^Wget" bad_bot
SetEnvIfNoCase User-Agent "^EmailSiphon" bad_bot
SetEnvIfNoCase User-Agent "^EmailWolf" bad_bot
SetEnvIfNoCase User-Agent "^libwww-perl" bad_bot
<Location />
Order allow,deny
Allow from all
Deny from env=bad_bot
</Location>这是在另一篇文章http://community.spiceworks.com/how_至/1443-如何对块-libwww-perl中提出的,但这给了我一个内部服务器错误500。
有什么想法吗?
亲切的问候
发布于 2015-05-03 19:53:09
尝试下面的块,我只是在我的Apache设置上自己测试了它,它运行得很好。
<IfModule mod_rewrite.c>
RewriteEngine on
SetEnvIfNoCase User-Agent ^libwww-perl bad_bot
Order Allow,Deny
Allow from ALL
Deny from env=bad_bothttps://serverfault.com/questions/687144
复制相似问题