Jump to content


Photo

Ip Banning Through .htaccess


  • This topic is locked This topic is locked
No replies to this topic

#1 TCH-Sales

TCH-Sales

    Support

  • Members
  • PipPipPipPip
  • 1,516 posts

Posted 03 September 2003 - 06:26 PM

From the .htaccess file, you can ban certain IP addresses from getting access to your site at all. You’ll need to add the following into your .htaccess file:

order allow,deny
deny from xxx.xx.x.x
allow from all

All the work you need to do is replace the "xxx.xx.x.x" with the IP you want to ban. You can also do more than once, just add the "deny from xxx.xx.x.x" under the previous one, like this:

order allow,deny
deny from xxx.xx.x.x
deny from xxx.xx.x.x
deny from xxx.xx.x.x
allow from all

This shows you that three IP addresses are being blocked. You could also change “allow from all” to “deny from all” to turn everyone away from your site. It's just that easy!




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users