robots.txt文件的格式
robots.txt文件的格式为: User-agent: [user-agent-name] Disallow: [URL path] 其中,[user-agent-name]指代搜索引擎爬虫的名称,[URL path]指代禁止访问的URL路径。在文件中可以定义多条User-agent和Disallow规则,每一条规则占一行,每一对规则之间要有一个空行。示例: User-agent: * Disallow: /private/ Disallow: /secret/ User-agent: Baiduspider Disallow: /admin/ User-agent: Googlebot Disallow: /tmp/