Loading...
Changes Saved.
Error Occurred!

IP banning through .htaccess

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:

CODE
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:

CODE
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



Related Articles