当前位置:网站首页>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;
}注:规则中默认屏蔽部分不明蜘蛛,要屏蔽其他蜘蛛按规则添加即可
边栏推荐
- 无心剑汉英双语诗004.《剑》
- 简单ELK配置实现生产级别的日志采集和查询实践
- Simple file transfer protocol TFTP
- JDBC and MySQL databases
- ADB double click the power key command
- 2-5 basic configuration -win2003 add attack surface
- How to judge that the thread pool has completed all tasks?
- Reprinted article: the digital economy generates strong demand for computing power Intel releases a number of innovative technologies to tap the potential of computing power
- Unity WebGL打包后怎么运行(火狐配置)
- Flashtext, a data cleaning tool, has directly increased the efficiency by dozens of times
猜你喜欢

【倒立摆控制】基于UKF无迹卡尔曼滤波的倒立摆控制simulink仿真

PSM总结

Exploration on the construction path of real-time digital warehouse integrating digital intelligence learning and streaming batch

Reprinted article: the digital economy generates strong demand for computing power Intel releases a number of innovative technologies to tap the potential of computing power
![[today in history] June 10: Apple II came out; Microsoft acquires gecad; The scientific and technological pioneer who invented the word](/img/0d/9f99eb3dcb73c912987b81fba71890.png)
[today in history] June 10: Apple II came out; Microsoft acquires gecad; The scientific and technological pioneer who invented the word "software engineering" was born

在线文本按行批量反转工具

Usage details of staticlayout
![[kotlin] basic introduction and understanding of its syntax in Android official documents](/img/44/ec59383ddfa2624a1616d13deda4a4.png)
[kotlin] basic introduction and understanding of its syntax in Android official documents

JDBC and MySQL databases

【活动早知道】LiveVideoStack近期活动一览
随机推荐
英特尔锐炫A380显卡即将在中国面市
math_(函数&数列)极限的含义&误区和符号梳理/邻域&去心邻域&邻域半径
Simple file transfer protocol TFTP
[today in history] May 29: the pioneer of sharing software was born; Chromebox launched; VoodooPC founder was born
ADB double click the power key command
[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
[elevator control system] design of elevator control system based on VHDL language and state machine, using state machine
音视频技术开发周刊 | 251
How does win11 add printers and scanners? Win11 add printer and scanner settings
如何开启多语言文本建议?Win11打开多语言文本建议的方法
基于STM32的编写
[today in history] June 6: World IPv6 launch anniversary; Tetris release; Little red book established
Publicity of the third batch of shortlisted enterprises! Annual Top100 smart network supplier selection
[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
[kotlin] basic introduction and understanding of its syntax in Android official documents
Arduino esp8266 web LED control
Usage details of staticlayout
Interview: is bitmap pixel memory allocated in heap memory or native
第三批入围企业公示!年度TOP100智能网联供应商评选
[today in history] June 7: kubernetes open source version was released; Worldofwarcraft landed in China; Birth of the inventor of packet switching network