there seems to be at least 2 ways to block country's and specific urls
there is this generated from block country
<Limit GET HEAD POST>
order allow,deny
deny from 77.242.16.0/20
deny from 80.78.64.0/20
etc
allow from all
</LIMIT>
and this which I built from some other posts and info
RewriteEngine on
RewriteBase /
RewriteCond %{HTTP_USER_AGENT} ^EmailCollector
RewriteCond %{HTTP_REFERER} ^-?$ [NC]
RewriteCond %{HTTP_USER_AGENT} ^-?$ [NC]
RewriteCond %{REMOTE_ADDR} ^216\.169\.111\.
etc for remote_addr
RewriteCond %{HTTP_REFERER} ^http://www.iaea.org$
RewriteRule ^.* - [F]
I know I can add rewriteCond directives for different octets of the url, is either method better than the other?
my main interest is the most efficient since this is for my test machine where I have anywhere from 3 to 8 virtual host sites I working on and I want my httpd to get rid of the spammers/hackers with minimal processing since my httpd can bog down my processing.
for example between may and june 212.117.163.3 hit my access log 203000+ times! I don't care if its a legit robot, I want it disposed of as efficiently as possible. I'm actually putting some in my router but over all its easier to .htaccess