formats

Apache Block By User Agent

Published on June 28, 2011, by + in sysadmin.

Apache Block By User Agent | Though this is trivial to circumvent, an easy way to block by User Agent with Apache is to use mod_rewrite. This is rather more useful to deny spam bots, scammers, and other automated tools from poking at your website! The following rewrite rule gives a 403 Forbidden for example: RewriteEngine On RewriteCond %{HTTP_USER_AGENT} HTTrack RewriteRule

Home Posts tagged "htaccess mod_rewrite"