Robots.txt Disallow Certain Folder Names

社会主义新天地 提交于 2019-12-07 05:17:31

问题


I want to disallow robots from crawling any folder, at any position in the url with the name: this-folder.

Examples to disallow:

http://mysite.com/this-folder/
http://mysite.com/houses/this-folder/
http://mysite.com/some-other/this-folder/
http://mysite.com/no-robots/this-folder/

This is my attempt:

Disallow: /.*this-folder/

Will this work?


回答1:


Officially globbing and regular expressions are not supported:

http://www.robotstxt.org/robotstxt.html

but apparently some search engines support this.



来源:https://stackoverflow.com/questions/3501661/robots-txt-disallow-certain-folder-names

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!