Forum Moderators: phranque

Message Too Old, No Replies

What's wrong with this .htaccess?

         

Frank_Rizzo

11:07 pm on Sep 14, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



<Limit GET>
order allow,deny
deny from nnn.nnn.nnn.nnn
allow from all
</Limit>
#rewriteEngine on
#rewriteCond %{HTTP_USER_AGENT} ^LinksManager [OR]
#rewriteCond %{HTTP_USER_AGENT} ^EmailSiphon [OR]
#rewriteCond %{HTTP_USER_AGENT} ^httrack [NC,OR]
#rewriteCond %{HTTP_USER_AGENT} ^Production\ Bot[OR]
#rewriteCond %{HTTP_USER_AGENT} ^Full\ Web\ Bot[OR]
#rewriteCond %{HTTP_USER_AGENT} ^Microsoft\ URL\ Control
#rewriteRule ^.* - [F]

-----

There's two problems here.

1) The deny from is not blocking a certain IP. The logs show that the IP is still reading files

2) If I uncomment the rewrite block then everyone gets an error 500.

This is a copy of an .htaccess which I'm sure I had running on an old debian server with apache 1.3

This is now running on Suse 9 and apache 2.0.48

Frank_Rizzo

11:29 pm on Sep 14, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Ahh, just spotted another thread here which says that I need to load the modrewrite module.

jdMorgan

12:03 am on Sep 15, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Note that this code only affects GET requests. A listed IP could do other things, like POST or DELETE without being hindered.

<Limit GET>
order allow,deny
deny from nnn.nnn.nnn.nnn
allow from all
</Limit>

You might be happier with:

<Files *>
Order Allow,Deny
Deny from nnn.nnn.nnn.nnn
Allow from all
</Files>

Jim