Disable remotely downloading webpages using curl/wget

时间:2017-11-13 06:08:31

标签: linux apache cdn iptables cloudflare

I need to disable remotely downloading my web pages using curl/wget.

I want to disable curl -vv http://www.example.com and I need to get a result like this

**

  • Rebuilt URL to: http://www.example.com/ Trying 12.34.56.78... TCP_NODELAY set Connected to www.example.com (12.34.56.78) port 80 (#0) GET / HTTP/1.1 Host: www.example.com User-Agent: curl/7.53.1 Accept: / HTTP/1.1 301 Moved Permanently Server: AkamaiGHost Content-Length: 0 Location: http://www.example.com/ Date: Mon, 13 Nov 2017 05:52:50 GMT Connection: keep-alive Connection #0 to host www.example.com left intact

**

I am using Apache, Using Cloudflare. Please help me

1 个答案:

答案 0 :(得分:0)

您可以使用以下规则停用wgetcurl

RewriteCond %{HTTP_USER_AGENT} ^pycurl [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^Wget [NC,OR]

只需将它们添加到.htaccess