当前位置:网站首页>Apache, IIS6 and ii7 independent IP hosts screen and intercept spider crawling (applicable to VPS virtual machine servers)
Apache, IIS6 and ii7 independent IP hosts screen and intercept spider crawling (applicable to VPS virtual machine servers)
2022-06-28 03:04:00 【wwwwestcn】
If it is a normal search engine spider access , It is not recommended to ban spiders , Otherwise, the collection and ranking of the website in Baidu and other search engines will be lost , Causing losses such as loss of customers . You can give priority to upgrading the virtual host model to get more traffic or upgrade to Cloud server ( Its unlimited ). For more details, please visit : http://www.west.cn/faq/list.asp?unid=626
1. Use the web site administration assistant environment :http://www.west.cn/faq/list.asp?unid=650 Refer to this instruction to enable setting pseudo static components
2. windows2003+iis Manual station building environment :http://www.west.cn/faq/list.asp?unid=639 Refer to this instruction to load pseudo static components
3. Then configure in the configuration file according to the following system rules
Linux Next Rules file .htaccess( Create... By hand .htaccess File to the site root directory )
<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 Next Rules file 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 Next 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 Corresponding shielding rules
The code needs to be added to the corresponding site configuration file server In segment
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;
}notes : The default shielding part of the rule is unknown spiders , To shield other spiders, add them according to the rules
Link to the original text :https://www.west.cn/faq/list.asp?unid=820
边栏推荐
- Gateway microservice routing failed to load microservice static resources
- Usage differences between isempty and isblank
- You got 8K in the 3-year function test, but were overtaken by the new tester. In fact, you are pretending to work hard
- 【活动早知道】LiveVideoStack近期活动一览
- 横向滚动的RecycleView一屏显示五个半,低于五个平均分布
- How to judge that the thread pool has completed all tasks?
- Simple elk configuration to realize production level log collection and query practice
- [today in history] June 6: World IPv6 launch anniversary; Tetris release; Little red book established
- 《天天数学》连载53:二月二十一日
- ByteDance Interviewer: how to calculate the memory size occupied by a picture
猜你喜欢

腾讯游戏发布40多款产品与项目 其中12款为新游戏

Feign远程调用fallback回调失败,无效果

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

Moving Tencent to the cloud: half of the evolution history of cloud server CVM
![[today in history] June 24: Netease was established; The first consumer electronics exhibition was held; The first webcast in the world](/img/f7/b3239802d19d00f760bb3174649a89.jpg)
[today in history] June 24: Netease was established; The first consumer electronics exhibition was held; The first webcast in the world

Get 5 offers after being notified of layoffs

Intel Ruixuan A380 graphics card will be launched in China

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

Review the submission of small papers for 2022 spring semester courses
![[today in history] June 2: Apple launched swift programming language; China Telecom acquires China Unicom C network; OS X Yosemite release](/img/24/58c4ee72e067f01a4c4aa57a1cf61a.jpg)
[today in history] June 2: Apple launched swift programming language; China Telecom acquires China Unicom C network; OS X Yosemite release
随机推荐
How to judge that the thread pool has completed all tasks?
Shuttle uses custompaint to paint basic shapes
[today in history] June 6: World IPv6 launch anniversary; Tetris release; Little red book established
CMU puts forward a new NLP paradigm - reconstructing pre training, and achieving 134 high scores in college entrance examination English
isEmpty 和 isBlank 的用法区别
PSM总结
【Kotlin】在Android官方文档中对其语法的基本介绍和理解
新手炒股开户选哪家证券平台办理是最好最安全的
[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
Simple elk configuration to realize production level log collection and query practice
Usage details of staticlayout
Built in functions for MySQL database operations
Win11 cannot create a new text document? Solution to win11 right click failure to create a new text document
Flask Foundation: template inheritance + static file configuration
AgilePLM异常解决-Session篇
Raspberry pie - environment settings and cross compilation
Online JSON to plaintext tool
无心剑英汉双语诗004.《静心》
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
Interview: is bitmap pixel memory allocated in heap memory or native