我想只允许主URL(域)http://domain/about和其他URL搜索谷歌不可见.示例我有如下链接:
http://example.com
http://example.com/about
http://example.com/other1
http://example.com/other2
http://example.com/other3
http://example.com/other4
http://example.com/other5
http://example.com/other6
and more URL.
Run Code Online (Sandbox Code Playgroud)
我的问题是robot.txt的内容,我想只允许http://example.com和http://example.com/about,我的网站使用wordpress.
谢谢.
你想要的是:
User-agent: *
Allow: /$
Allow: /about
Disallow: /
Run Code Online (Sandbox Code Playgroud)
该$指示URL字符串必须结束.所以它不允许,例如,/example.com/foo.