回到顶部

CONTENTS

站点 robots 文件在线生成

robots 介绍

https://blog.csdn.net/fanghua_vip/article/details/79535639

在线生成链接

http://tool.chinaz.com/robots/

本站 robots.txt

User-agent: *
Disallow: 
Crawl-delay: 5
Disallow: /bin/
Disallow: /photos
Sitemap: http://xieboke.net/sitemap.xml

view

def robots(request):
    with open("joyoo/robots.txt", "r") as f:
        content = "<pre>"
        for text in f.readlines():
            content += text
        content += "</pre>"
    return HttpResponse(content)

urls

urlpatterns = [ 
                 url(r'^robots', robots),
              ]

 


^_^
请喝咖啡 ×

前一篇: 博客评论接入百度云 文本审核 API
下一篇: 丰富的 emoji 表情添加到代码中
captcha
带 * 是必填项