Jump to content

Ip Banning Through .htaccess


TCH-Sales

Recommended Posts

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!

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...