首页 > 解决方案 > 命令拒绝、允许、拒绝来自 IP 不阻止 IP 地址,不工作

问题描述

order allow,deny
deny from 1.0.1.0/24
deny from 1.0.2.0/23
deny from 1.0.32.0/19
deny from 1.0.8.0/21
deny from 1.1.0.0/24
allow from all

我正在使用上面的代码来阻止.htaccess. 但它不起作用。如果我删除"allow from all",那么网站给出forbidden for all IP address。这有什么问题?

httpd配置如下:

<Directory /var/www/html/foldername/>
      Options -Indexes +FollowSymLinks
      AllowOverride All
      Order allow,deny
      Allow from all
      </Directory>

任何人都可以帮忙吗?

标签: php.htaccessipblockinghttpforbiddenhandler

解决方案


推荐阅读