PDA

View Full Version : ip block


Michael.A
01-13-2009, 02:52 AM
is there a mode or a way to block ip's from ''seeing'' the site and like redirect all the blocked ip's to other url..?? thax for the help

Bellardia
01-13-2009, 02:59 AM
You can use the .htaccess file

deny from 123.45.6.7
deny from 192.168.

Ending with an ' . ' early serves as a wildcard for the rest of the digits.

Michael.A
01-13-2009, 03:03 AM
is there a code i need to add on there?
like for example if i want to banned 67.224.146.186 / 75.118.205.121 how do i add it to the .htaccess file

Bellardia
01-13-2009, 03:06 AM
order allow,deny
deny from 67.224.146.186
deny from 75.118.205.121
allow from all


Each one its own line inside the .htaccess file, not else, nothing more!

Michael.A
01-13-2009, 03:27 AM
order allow,deny
deny from 67.224.146.186
deny from 75.118.205.121
allow from all


Each one its own line inside the .htaccess file, not else, nothing more!

thank you that work's what about redirect all the deny ip's to another url ????

Bellardia
01-13-2009, 03:45 AM
Add

ErrorDocument 403 http://www.somepage.com

Note: This is the simple solution, 403 error is forbidden, so if for some reason access to your forum is blocked off to non-authenticated users everyone who isn't authenticated will be redirected. Keep that in mind when deciding which page to link to, just in case ;)