当前位置:网站首页>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;
}注:规则中默认屏蔽部分不明蜘蛛,要屏蔽其他蜘蛛按规则添加即可
边栏推荐
- Usage details of staticlayout
- How does win11 add printers and scanners? Win11 add printer and scanner settings
- [today in history] June 5: Lovelace and Babbage met; The pioneer of public key cryptography was born; Functional language design pioneer born
- Packet capturing and sorting out external Fiddler -- understanding the toolbar [1]
- Mixed programming of C language and assembly language in stm32
- JDBC与MySQL数据库
- [kotlin] basic introduction and understanding of its syntax in Android official documents
- [today in history] June 17: the creator of the term "hypertext" was born; The birth of Novell's chief scientist; Discovery channel on
- SQL reported an unusual error, which confused the new interns
- What if win11 can't drag an image to the taskbar software to open it quickly
猜你喜欢

腾讯游戏发布40多款产品与项目 其中12款为新游戏
![[today in history] June 6: World IPv6 launch anniversary; Tetris release; Little red book established](/img/06/895913d2c54b03cde86b3116955a9e.png)
[today in history] June 6: World IPv6 launch anniversary; Tetris release; Little red book established

Gateway微服務路由使微服務靜態資源加載失敗
![[today in history] June 18: JD was born; The online store platform Etsy was established; Facebook releases Libra white paper](/img/88/6cdd2b604522261e2a88020c5d6ae7.jpg)
[today in history] June 18: JD was born; The online store platform Etsy was established; Facebook releases Libra white paper

微信小程序中生成二维码

Raspberry pie - environment settings and cross compilation

Win11 cannot create a new text document? Solution to win11 right click failure to create a new text document

Why are so many people keen on big factories because of the great pressure and competition?

CMU puts forward a new NLP paradigm - reconstructing pre training, and achieving 134 high scores in college entrance examination English

Stm32f1 and stm32subeide programming example - metal touch sensor driver
随机推荐
be fond of the new and tired of the old? Why do it companies prefer to spend 20K on recruiting rather than raise salaries to retain old employees
《天天数学》连载53:二月二十一日
新手炒股开户选哪家证券平台办理是最好最安全的
【 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
目标检测|SSD原理与实现
MFC常用 当前路径
"Everyday Mathematics" serial 53: February 21
初始线性回归
Severe Tire Damage:世界上第一个在互联网上直播的摇滚乐队
How to run unity webgl after packaging (Firefox configuration)
[today in history] June 18: JD was born; The online store platform Etsy was established; Facebook releases Libra white paper
Raspberry pie - environment settings and cross compilation
StaticLayout的使用详解
元宇宙标准论坛成立
Gateway microservice routing failed to load microservice static resources
win11如何添加打印机和扫描仪?win11添加打印机和扫描仪的设置
[today in history] May 29: the pioneer of sharing software was born; Chromebox launched; VoodooPC founder was born
isEmpty 和 isBlank 的用法区别
[fuzzy neural network] simulation of fuzzy neural network based on MATLAB
毕业季来临,2022届高校毕业生人数首次突破千万大关