htaccess 限制不友好IP

htaccess 限制不友好IP

1. htaccess设置网站禁止某个ip访问
Order deny,allow //order是对他们的先后顺序
deny from 127.0.0.1
allow from all
2.htaccess禁止ip段访问
order deny,allow
deny from 1.0.1.0/24
deny from 1.0.2.0/23
allow from all
3.htaccess设置网站只允许某个ip段访问,其他进行跳转
ErrorDocument 403 http://www.liuyp.com/
Order deny,allow
deny from all
allow from 1.0.1.0/24
allow from 1.0.2.0/23
allow from 1.0.8.0/21

发表评论

© 2022. powered by PHP 个人小站