.htaccess block IP

Need help installing PHP, configuring a script, or configuring a server? Then come on in and post your questions! We'll try to help the best we can!

Moderator: General Moderators

Post Reply
ssand
Forum Commoner
Posts: 72
Joined: Sat Jun 22, 2002 9:25 pm
Location: Iowa

.htaccess block IP

Post by ssand »

I think I have this correct, but I haven't used .htaccess much for blocking an IP. (I say I think because at least I can still see my site!).

Could someone verify that I have this defined correctly? And if I need to add more I can just copy the deny line correct?

Here's what I have in my .htaccess file:

Code: Select all

<Files *>
order deny,allow
deny from xxx.xx.xxx.xx
</Files>

# Prevent web browsers or spiders from seeing your .htaccess directives:
<Files .htaccess>
deny from all
</Files>

Thanks. :D
User avatar
Zoxive
Forum Regular
Posts: 974
Joined: Fri Apr 01, 2005 4:37 pm
Location: Bay City, Michigan

Post by Zoxive »

ssand
Forum Commoner
Posts: 72
Joined: Sat Jun 22, 2002 9:25 pm
Location: Iowa

Post by ssand »

Thanks.
The Fearful Developer wrote:But I agree with you. I have been guilty of doing this more than once...
:roll:

-
Post Reply