apache禁止网络爬虫采集
Apache中禁止网络爬虫,之前设置了很多次的,但总是不起作用,原来是是写错了,不能写到Dirctory中,要写到Location中
1
2
3
4
5
6
7
8
9
|
<
Location
/
>
SetEnvIfNoCase
User
-
Agent
"spider"
bad_bot
BrowserMatchNoCase
bingbot
bad_bot
BrowserMatchNoCase
Googlebot
bad_bot
Order
Deny
,
Allow
#下面是禁止soso的爬虫
Deny
from
124.115.4.
124.115.0.
64.69.34.135
216.240.136.125
218.15.197.69
155.69.160.99
58.60.13.
121.14.96.
58.60.14.
58.61.164.
202.108.7.209
Deny
from
env
=
bad_bot
<
/
Location
>
|
1
|
SetEnvIfNoCase
User
-
Agent
"spider"
bad_bot
|
这是禁止了所有包含spider字符的爬虫。
如果要针对性的禁止爬虫,改成精确匹配的爬虫字符串,如果bingbot、Googlebot等等
收 藏
成长的对话版权声明:以上内容作者已申请原创保护,未经允许不得转载,侵权必究!授权事宜、对本内容有异议或投诉,敬请联系网站管理员,我们将尽快回复您,谢谢合作!