网络营销电子商务研究中心

网络营销电子商务研究中心 (https://www.0058.net/index.php)
-   代码交流 (https://www.0058.net/forumdisplay.php?f=16)
-   -   Block IP addresses from my site? (https://www.0058.net/showthread.php?t=1601)

topvip 2006-10-18 12:51 AM

Block IP addresses from my site?
 
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.


All times are GMT +8. The time now is 12:26 AM.

Powered by vBulletin Version 3.8.7
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.