0

Ngnix 怎样屏蔽到爬虫和蜘蛛?

dora created at6 years ago view count: 2431

有很多国外的爬虫,并且写rebots.txt规则也没有用。

5.255.250.45 - - [07/Aug/2017:12:56:37 +0800] "GET / HTTP/1.1" 200 3048 "-" "Mozilla/5.0 (compatible; YandexBot/3.0; +http://yandex.com/bots)"
report
回复
0

配置里面添加下

 if ($http_user_agent ~* 'YandexBot') {
        return 403;
}
6 years ago 回复

相关搜索关键词

Recent search keywords