Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add robots.txt #23

Closed
lord63 opened this issue Oct 26, 2015 · 3 comments
Closed

Add robots.txt #23

lord63 opened this issue Oct 26, 2015 · 3 comments

Comments

@lord63
Copy link
Owner

lord63 commented Oct 26, 2015

No description provided.

@lord63
Copy link
Owner Author

lord63 commented Oct 26, 2015

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

@lord63
Copy link
Owner Author

lord63 commented Oct 26, 2015

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

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

lord63 added a commit that referenced this issue Oct 26, 2015
@lord63 lord63 closed this as completed Oct 26, 2015
@lord63
Copy link
Owner Author

lord63 commented Oct 26, 2015

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant