Quote:
|
Can I block certain IP addresses from seeing my website?
|
Yes, you can block certain IP addresses from accessing your site by using a Deny directive in an .htaccess file.
The Apache documentation explains how to do this:
http://httpd.apache.org/docs/mod/mod_access.html
http://httpd.apache.org/docs/howto/auth.html
For example, if you put the following .htaccess file in a directory, then it would operate on all directories beneath it:
Quote:
Deny from evil-person.attbi.com
Deny from 51.128.65.62
Deny from 207.51.29
|
The first Deny directive would block the exact host mentioned. The second Deny would block the exact IP address 61.128.65.62. The third directive would block all IP addresses fitting the pattern 207.51.29.anything.