运维网's Archiver
论坛
›
apache
› Apache 禁止指定user_agent
昊漫玉
发表于 2018-11-20 06:53:04
Apache 禁止指定user_agent
1.编辑虚拟主机文件
vim /usr/local/apache2/conf/extra/httpd-vhosts.conf
编辑 模块,在底部加入:
RewriteCond %{HTTP_USER_AGENT}^.*curl.*
RewriteCond %{HTTP_USER_AGENT}^.*chrome*
RewriteRule .*-
----禁止带curl或者chrome标识的访问网站
页:
[1]
查看完整版本:
Apache 禁止指定user_agent