成都创新互联网站制作重庆分公司

apache禁止指定user_agent和禁止解析php

   
        RewriteEngine on

创新互联建站于2013年创立,先为普宁等服务建站,普宁等地企业,进行企业商务咨询服务。为普宁企业网站制作PC+手机+微官网三网同步一站式服务解决您的所有建站问题。

          RewriteCond %{HTTP_USER_AGENT}  ^.*curl.* [NC,OR]

          RewriteCond %{HTTP_USER_AGENT}  ^.*chrom* [NC]

        RewriteRule  .*  -  [F]
   

测试:[root@www ~]# curl -x127.0.0.1:80 www.test.com/forum.php(会提示403 Forbidden

[root@www ~]# curl -x127.0.0.1:80 www.test.com/adkljh(也是403)

[root@www ~]# curl -x192.168.137.2:80 www.test.com/asdfg(也是403)

现在把curl那行注释,[root@www ~]# curl -x192.168.137.2:80 www.test.com/asdfg(会提示404)

[root@www ~]# curl -x192.168.137.2:80 www.test.com/forum.php -I(会提示200)


网页名称:apache禁止指定user_agent和禁止解析php
路径分享:http://cxhlcq.com/article/jsjgjc.html

其他资讯

在线咨询

微信咨询

电话咨询

028-86922220(工作日)

18980820575(7×24)

提交需求

返回顶部