How do I block a user-agent from Apache

Posted by rubo77 on Pro Webmasters See other posts from Pro Webmasters or by rubo77
Published on 2013-06-26T05:46:14Z Indexed on 2013/06/26 10:28 UTC
Read the original article Hit count: 507

How do I realize a UA string block by regular expression in the config files of my Apache webserver?

For example: if I would like to block out all bots from Apache on my debian server, that have the regular expression /\b\w+[Bb]ot\b/ or /Spider/ in their user-agent.

Those bots should not be able to see any page on my server and they should not appear neither in the accesslogs nor in the errorlogs.

http://global-security.blogspot.de/2009/06/how-to-block-robots-before-they-hit.html supposes to uses mod_security for that, but isn't there a simple directive for http.conf?

© Pro Webmasters or respective owner

Related posts about googlebot

Related posts about apache2