Add robots.txt
lord63 opened this issue · comments
lord63 commented
lord63 commented
主要原因是因为网站的图片都是缓存在自己 redis 那里的,不希望被爬虫爬,担心被玩坏 _(:3
lord63 commented
在 nginx 配置文件里设置下就行了。
location /robots.txt {
alias /Directory-containing-robots-file;
}
lord63 commented
使用robots.txt阻止对网址的访问,还可以使用 G 娘提供的测试你的 robots.txt 规则的效果。