Back to Programming Articles

Block User Ip From Your (.htaccess)
by Terminatoronly 15 Jan 2007
Rating: (1 vote - 4.00 average)

Hi All,
well all of our forums have some bad members who want to do bad things in our forum so if you want to block him from cpanel he can access again so i thought of this thing blocking Member Ip From (htaccess) file.

What Does this do?
This Will Block The User IP Or Proxy If You Want From Viewing Your Site.

How It Works?
Make A New File Using Note Pad and put this code on it:
PHP Code:
<Limit GET HEAD POST>
order allow,deny
deny from 188.156.187
.***
deny from 188.155.187.***
allow from all
</LIMIT
This One Will Block The User Ip Who IS Using This IP:
PHP Code:
188.156.187.***
188.155.187.*** 
If You Want To Add More Ip's Just put it between:
PHP Code:
order allow,deny

allow from all 
After Adding This To Notepad Save it like this name:
Code:
htaccess.txt
then upload it using your ftp and name it to:
Code:
.htaccess
Also upload it in ASCII format.

Also You Can Add Domains To Block list .

Enjoy It

vblts.ru supports vBulletin®, 2022-2024