lord63 / zhihudaily

又一个知乎日报的网页版... https://zhihudaily.lord63.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add robots.txt

lord63 opened this issue · comments

主要原因是因为网站的图片都是缓存在自己 redis 那里的,不希望被爬虫爬,担心被玩坏 _(:3

在 nginx 配置文件里设置下就行了。

location /robots.txt {
    alias /Directory-containing-robots-file;
} 

使用robots.txt阻止对网址的访问,还可以使用 G 娘提供的测试你的 robots.txt 规则的效果。