当前位置:网站首页>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;
}注:规则中默认屏蔽部分不明蜘蛛,要屏蔽其他蜘蛛按规则添加即可
边栏推荐
- 买股票应该下载什么软件最好最安全?
- Packet capturing and sorting out external Fiddler -- understanding the toolbar [1]
- How does win11 close recently opened projects? Win11 method to close recently opened projects
- STM32的C语言与汇编语言混合编程
- Interview: how do lists duplicate objects according to their attributes?
- How to enable multi language text suggestions? Win11 method to open multilingual text suggestions
- win11如何添加打印机和扫描仪?win11添加打印机和扫描仪的设置
- Get 5 offers after being notified of layoffs
- [today in history] June 19: iPhone 3GS launched; Pascal was born; Anti terrorist elite begins testing
- math_ (function & sequence) meaning of limit & misunderstanding and symbol sorting / neighborhood & de centring neighborhood & neighborhood radius
猜你喜欢

转载文章:数字经济催生强劲算力需求 英特尔发布多项创新技术挖掘算力潜能
![[fuzzy neural network] simulation of fuzzy neural network based on MATLAB](/img/2f/ffe3baf37808b78b2c299aef5a717e.jpg)
[fuzzy neural network] simulation of fuzzy neural network based on MATLAB

Desai wisdom number - histogram (column folding mixed graph): ratio of rental price to rental income in the graduation quarter of 2021

STM32的C语言与汇编语言混合编程
![[today in history] June 5: Lovelace and Babbage met; The pioneer of public key cryptography was born; Functional language design pioneer born](/img/af/1faf1df4262940e73104ed2880f08d.png)
[today in history] June 5: Lovelace and Babbage met; The pioneer of public key cryptography was born; Functional language design pioneer born
![抓包整理外篇fiddler————了解工具栏[一]](/img/5f/24fd110a73734ba1638f0aad63c787.png)
抓包整理外篇fiddler————了解工具栏[一]

Win11无法使用动态壁纸怎么办?Win11用不了动态壁纸的解决方法

Online text batch inversion by line tool
![[today in history] June 23: Turing's birthday; The birth of the founder of the Internet; Reddit goes online](/img/d5/4b3e622ab77bc546ca5d285ef67d8a.jpg)
[today in history] June 23: Turing's birthday; The birth of the founder of the Internet; Reddit goes online

Moving Tencent to the cloud: half of the evolution history of cloud server CVM
随机推荐
Win11 ne peut pas faire glisser l'image sur le logiciel de la barre des tâches
喜新厌旧?IT公司为什么宁愿花20k招人,也不愿涨薪留住老员工
Flask Foundation: template inheritance + static file configuration
Différences d'utilisation entre IsEmpty et isblank
Shuttle uses custompaint to paint basic shapes
3年功能测试拿8K,被刚来的测试员反超,其实你在假装努力
在线JSON转PlainText工具
[today in history] June 25: the father of notebook was born; Windows 98 release; First commercial use of generic product code
Simple elk configuration to realize production level log collection and query practice
LiveData 面试题库、解答---LiveData 面试 7 连问~
Win11不能拖拽圖片到任務欄軟件上快速打開怎麼辦
2021年软件测试工具总结——模糊测试工具
The first place on the list - the carrying rate of front-end equipment is up to 10%, and the top 10 suppliers of digital key solutions
[fuzzy neural network] simulation of fuzzy neural network based on MATLAB
【电梯控制系统】基于VHDL语言和状态机实现的电梯控制系统的设计,使用了状态机
Interpretation of bilstm-crf in NER forward_ algorithm
《天天数学》连载53:二月二十一日
ByteDance Interviewer: how to calculate the memory size occupied by a picture
Interview: how do lists duplicate objects according to their attributes?
【插件-statistic】统计代码行数和相关数据