当前位置:网站首页>apache、iis6、ii7独立ip主机屏蔽拦截蜘蛛抓取(适用vps云主机服务器)
apache、iis6、ii7独立ip主机屏蔽拦截蜘蛛抓取(适用vps云主机服务器)
2022-06-28 01:21:00 【wwwwestcn】
如果是正常的搜索引擎蜘蛛访问,不建议对蜘蛛进行禁止,否则网站在百度等搜索引擎中的收录和排名将会丢失,造成客户流失等损失。可以优先考虑升级虚拟主机型号以获得更多的流量或升级为云服务器(不限流量)。更多详情请访问: http://www.west.cn/faq/list.asp?unid=626
1. 使用网站管理助手环境:http://www.west.cn/faq/list.asp?unid=650 参考此说明启用设置伪静态组件
2. windows2003+iis手工建站环境:http://www.west.cn/faq/list.asp?unid=639 参考此说明加载伪静态组件
3. 然后在配置文件中按以下系统规则配置
Linux下 规则文件.htaccess(手工创建.htaccess文件到站点根目录)
<IfModule mod_rewrite.c> RewriteEngine On #Block spider RewriteCond %{HTTP_USER_AGENT} "SemrushBot|Webdup|AcoonBot|AhrefsBot|Ezooms|EdisterBot|EC2LinkFinder|jikespider|Purebot|MJ12bot|WangIDSpider|WBSearchBot|Wotbox|xbfMozilla|Yottaa|YandexBot|Jorgee|SWEBot|spbot|TurnitinBot-Agent|mail.RU|curl|perl|Python|Wget|Xenu|ZmEu" [NC] RewriteRule !(^robots\.txt$) - [F] </IfModule>
windows2003下 规则文件httpd.conf
#Block spider RewriteCond %{HTTP_USER_AGENT} (SemrushBot|Webdup|AcoonBot|AhrefsBot|Ezooms|EdisterBot|EC2LinkFinder|jikespider|Purebot|MJ12bot|WangIDSpider|WBSearchBot|Wotbox|xbfMozilla|Yottaa|YandexBot|Jorgee|SWEBot|spbot|TurnitinBot-Agent|mail.RU|curl|perl|Python|Wget|Xenu|ZmEu) [NC] RewriteRule !(^/robots.txt$) - [F]
windows2008下 web.config
<?xml version="1.0" encoding="UTF-8"?> <configuration> <system.webServer> <rewrite> <rules> <rule name="Block spider"> <match url="(^robots.txt$)" ignoreCase="false" negate="true" /> <conditions> <add input="{HTTP_USER_AGENT}" pattern="SemrushBot|Webdup|AcoonBot|AhrefsBot|Ezooms|EdisterBot|EC2LinkFinder|jikespider|Purebot|MJ12bot|WangIDSpider|WBSearchBot|Wotbox|xbfMozilla|Yottaa|YandexBot|Jorgee|SWEBot|spbot|TurnitinBot-Agent|curl|perl|Python|Wget|Xenu|ZmEu" ignoreCase="true" /> </conditions> <action type="AbortRequest" /> </rule> </rules> </rewrite> </system.webServer> </configuration>
Nginx对应屏蔽规则
代码需添加到对应站点配置文件server段内
if ($http_user_agent ~ "Bytespider|Java|PhantomJS|SemrushBot|Scrapy|Webdup|AcoonBot|AhrefsBot|Ezooms|EdisterBot|EC2LinkFinder|jikespider|Purebot|MJ12bot|WangIDSpider|WBSearchBot|Wotbox|xbfMozilla|Yottaa|YandexBot|Jorgee|SWEBot|spbot|TurnitinBot-Agent|mail.RU|perl|Python|Wget|Xenu|ZmEu|^$" ) { return 444; }
注:规则中默认屏蔽部分不明蜘蛛,要屏蔽其他蜘蛛按规则添加即可
边栏推荐
- 【模糊神经网络】基于matlab的模糊神经网络仿真
- 英特尔锐炫A380显卡即将在中国面市
- math_(函数&数列)极限的含义&误区和符号梳理/邻域&去心邻域&邻域半径
- 在线JSON转PlainText工具
- 【 amélioration de la correction d'image de Code bidimensionnel】 simulation du traitement d'amélioration de la correction d'image de Code bidimensionnel basée sur MATLAB
- SQL reported an unusual error, which confused the new interns
- What if win11 cannot use dynamic wallpaper? Solution of win11 without dynamic wallpaper
- How to run unity webgl after packaging (Firefox configuration)
- "Everyday Mathematics" serial 53: February 21
- Win11 cannot create a new text document? Solution to win11 right click failure to create a new text document
猜你喜欢
How to systematically learn LabVIEW?
What if win11 cannot use dynamic wallpaper? Solution of win11 without dynamic wallpaper
math_ (function & sequence) meaning of limit & misunderstanding and symbol sorting / neighborhood & de centring neighborhood & neighborhood radius
[today in history] June 8: the father of the world wide web was born; PHP public release; IPhone 4 comes out
[today in history] June 20: the father of MP3 was born; Fujitsu was established; Google acquires dropcam
基于STM32的编写
Flashtext, a data cleaning tool, has directly increased the efficiency by dozens of times
TensorRT 模型推理优化实现
在线文本按行批量反转工具
Opencv -- geometric space transformation (affine transformation and projection transformation)
随机推荐
Interview: is bitmap pixel memory allocated in heap memory or native
Flashtext, a data cleaning tool, has directly increased the efficiency by dozens of times
Heartless sword Chinese English bilingual poem 004 Sword
Get 5 offers after being notified of layoffs
面试:Bitmap像素内存分配在堆内存还是在native中
Interview: how do lists duplicate objects according to their attributes?
[today in history] June 23: Turing's birthday; The birth of the founder of the Internet; Reddit goes online
How does win11 close recently opened projects? Win11 method to close recently opened projects
2021年软件测试工具总结——模糊测试工具
Win11 cannot create a new text document? Solution to win11 right click failure to create a new text document
Feign远程调用fallback回调失败,无效果
[postgraduate] bit by bit
[today in history] June 13: parent-child disputes in packet switched networks; The founder of game theory was born; The embryonic form of interactive television
isEmpty 和 isBlank 的用法区别
The graduation season is coming, and the number of college graduates in 2022 has exceeded 10 million for the first time
[today in history] June 12: the United States entered the era of digital television; Mozilla's original developer was born; 3com merges with American Robotics
Win11如何关闭最近打开项目?Win11关闭最近打开项目的方法
转载文章:数字经济催生强劲算力需求 英特尔发布多项创新技术挖掘算力潜能
SQL reported an unusual error, which confused the new interns
How to systematically learn LabVIEW?