打开httpd.conf文件

Documentroot

<Directory "你的网站根目录">

Options Indexes FollowSymLinks

AllowOverride None

Order deny,allow

Deny from 192.168.1.99

</Directory>

修改AllowOverride None 为AllowOverride All  表示为开启.htaccess

之后在网站根目录下创建.htaccess文件,写入

Order allow,deny  
Allow from all  
Deny from 112.110.0.0/255.255.0.0      //禁止112.110.x.x IP段所有IP

相关文章:

  • 2022-12-23
  • 2021-05-18
  • 2021-08-18
  • 2021-11-18
  • 2021-11-05
  • 2022-12-23
猜你喜欢
  • 2022-01-10
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-05
  • 2022-12-23
相关资源
相似解决方案