Block IP addresses from accessing your site via .htaccess

There are couple ways to block an IP, the one general way is to use htaccess deny feature.

SetEnvIf REMOTE_ADDR "^xxx.xxx.xxx.xxx$" badip
SetEnvIf REMOTE_ADDR "^xxx.xxx.xxx.xxx$" badip

<Limit GET POST>
order deny,allow
deny from env=badip
</Limit>

Comment