Forum Moderators: DixonJones

Message Too Old, No Replies

Is this a good .htaccess to block badbots, proxies, and log stuff

         

Frank_Rizzo

10:47 pm on Jun 19, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Here is my .htaccess file. Anything not quite right with it?

ErrorDocument 401 /cgi-bin/logger401.pl
ErrorDocument 403 /cgi-bin/logger403.pl
ErrorDocument 404 /cgi-bin/logger404.pl
<Limit GET>
order allow,deny
deny from 200.199.249.66
deny from 200.203.159.2
deny from 200.23.209.209
deny from 210.181.1.172
deny from 200.193.46.18
deny from 213.122.46.195
deny from 213.153.175.62
deny from 213.253.25.38
deny from 80.67.130.48
deny from 80.235.89.49
deny from 80.14.112.213
deny from 80.62.29.226
deny from 80.8.213.230
deny from 80.56.109.39
deny from 80.205.153.99
deny from 80.205.153.99
deny from 80.13.45.10
deny from 80.56.121.61
allow from all
</Limit>
rewriteEngine on
rewriteCond %{HTTP_USER_AGENT} ^Linksmanager [OR]
rewriteCond %{HTTP_USER_AGENT} ^Microsoft.URL [OR]
rewriteCond %{HTTP_USER_AGENT} ^EmailCollector
rewriteRule ^.*$ hold.html [L]

The first bit traps silly errors such as failing at logging into a private area, and if any old pages are trying to be viewed etc.

The second blocks proxy addresses which have been used for suspicious stuff, and any sites spewwing out nimda kind of stuff.

The third is from what I have read on here - blocks suspsicious stuff which is filling up my logfiles daily.

Can you see anything wrong with it? Would it be better to shove in httpd.conf?

Frank_Rizzo

7:25 pm on Jun 23, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Top.

Can someone confirm that the redirect stuff is correct?

I have one guy complaining that he keeps being redirected to the hold.html file.

Is there anyway that he could be redirected to hold.html if he is NOT with the UA listed?

mark_roach

5:57 pm on Jul 2, 2002 (gmt 0)

10+ Year Member



I don't know the answer to your question, but have you checked what user agent string he is sending. Perhaps a blank string could cause this to happen.