简体   繁体   English

禁用使用curl / wget远程下载网页

[英]Disable remotely downloading webpages using curl/wget

I need to disable remotely downloading my web pages using curl/wget. 我需要禁用使用curl / wget远程下载网页。

I want to disable curl -vv http://www.example.com and I need to get a result like this 我想禁用curl -vv http://www.example.com ,我需要得到这样的结果

** **

  • 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 重建URL到: http : //www.example.com/尝试12.34.56.78 ... TCP_NODELAY set已连接到www.example.com(12.34.56.78)端口80(#0)GET / HTTP / 1.1主机:www。 example.com用户代理:curl / 7.53.1接受: / HTTP / 1.1 301永久移动服务器:AkamaiGHost内容长度:0位置: http : //www.example.com/日期:2017年11月13日星期一05: 52:50 GMT连接:保持连接到主机www.example.com的活动连接0完整

** **

I am using Apache, Using Cloudflare. 我正在使用Apache,正在使用Cloudflare。 Please help me 请帮我

You can disable wget and curl with the rules below: 您可以使用以下规则禁用wgetcurl

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

Just add them to .htaccess . 只需将它们添加到.htaccess

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM