gpt4 book ai didi

robots.txt - Robot.txt 允许在域中指定 URL

转载 作者:行者123 更新时间:2023-12-02 22:15:12 28 4
gpt4 key购买 nike

我只想允许主要 URL(域)和 http://domain/about,其他 URL 对搜索 google 不可见。示例我有如下链接:

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.

我的问题是 robot.txt 的内容是什么,我只想允许 http://example.comhttp://example.com/about ,我的网站使用 wordpress。

谢谢。

最佳答案

你想要的是:

User-agent: *
Allow: /$
Allow: /about
Disallow: /

$ 表示 url 字符串必须在那里结束。所以它不允许,例如,/example.com/foo

关于robots.txt - Robot.txt 允许在域中指定 URL,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14598802/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com