Forum Moderators: phranque

Message Too Old, No Replies

deny IP only in .htaccess

         

smallcompany

8:02 pm on Feb 12, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



So, if we want to block a specific IP address, and in .htaccess enter this:

deny from "IP address"

do we still need "allow from all" listed there, complemented with order like allow,deny or deny,allow?

Will that single line do it without any consequences?

Apache reference explains it and gives examples but I am still nervous about using all three (allow, deny, order).

If used, I think it should be like this:

order allow,deny
deny from "IP address"
allow from all

but just think, not sure. Is it true that just changing order to deny.allow would allow everything, regardless of deny entry?

Thanks

wilderness

8:12 pm on Feb 12, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



This very old and vague:
[webmasterworld.com...]

Search Webmaster World for "baremetal" and you'll come acorss of variety of links that I've provided too frequnently.

Here's the Apache explantion:
[httpd.apache.org...]

smallcompany

9:07 pm on Feb 12, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



That's the one!

Thank you very much.