| | User-agent: * Disallow: | | 例3. 禁止某个搜索引擎的访问 | User-agent: BadBot Disallow: / |
| 例4. 答应某个搜索引擎的访问 | User-agent: baiduspider Disallow:
User-agent: * Disallow: / |
例5.一个简单例子 在这个例子中,该网站有三个目录对搜索引擎的访问做了限制,即搜索引擎不会访问这三个目录。 需要注重的是对每一个目录必须分开声明,而不要写成 "Disallow: /cgi-bin/ /tmp/"。 User-agent:后的*具有非凡的含义,代表"any robot",所以在该文件中不能有"Disallow: /tmp/*" or "Disallow:*.gif"这样的记录出现. | User-agent: * Disallow: /cgi-bin/ Disallow: /tmp/ Disallow: /~joe/ |
robots.txt文件参考资料robots.txt文件的更具体设置,请参看以下链接:
· Web Server Administrator's Guide to the Robots Exclusion Protocol
· HTML Author's Guide to the Robots Exclusion Protocol
· The original 1994 protocol description, as currently deployed
· The revised Internet-Draft specification, which is not yet completed or implemented
| 共2页: 上一页 [1] 2 下一页 |
评论加载中…