<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{HTTP_USER_AGENT} ^.*curl.* [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^.*chrom* [NC]
RewriteRule .* - [F]
</IfModule>
测试:[root@www ~]# curl -x127.0.0.1:80 www.test.com/forum.php(会提示<title>403 Forbidden</title>)
[root@www ~]# curl -x127.0.0.1:80
[root@www ~]# curl -x192.168.137.2:80
现在把curl那行注释,[root@www ~]# curl -x192.168.137.2:80
[root@www ~]# curl -x192.168.137.2:80 www.test.com/forum.php -I(会提示200)