Apache: Deny or Block IP using htaccess directives
ApacheIts 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.*”. You can also use domain names instead of ip’s for example if you add deny from *.provider.net no one with that host name will be able to access your website.
Thats it simple short tutorial on how to Deny certain IP using htaccess file
Tags: Apache, debny ip, htaccessRelated posts
Thursday, March 6th, 2008 at 4:35 pm and is filed under Apache. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.







