06Mar

Apache: Deny or Block IP using htaccess directives

Apache

Its very simple to deny certain ip’s or domain names from htaccess. For example if from various reasons you dont want some persons accessing your site anymore you just need to add the following to you htaccess file:
order allow,deny
deny from 1.1.1.3
deny from 2.2.2.
allow from all
This will allow access from anyone except “1.1.1.3″ and “2.2.2.*”. [...]

No comments | read more »