html - 禁止 googlebot 访问统计信息网址
问题描述
我有我的域,我托管了一个类似于 bitly 的链接缩短器。当有人创建一个短链接时,他们可以在 url 的末尾添加一个 ~s 并访问该 url 的统计信息。
例子:
最后没有 ~s ,它就像任何其他 url 缩短器一样工作。我想知道我是否以某种方式拒绝所有搜索引擎索引 url 以 robots.txt 中额外的 ~s 结尾的任何页面?
应该允许 https://example.com/123 但不允许https://example.com/123~s
解决方案
看起来robots.txt
支持通配符:
User-Agent: *
Disallow: /*~s
推荐阅读
- redis - Redis快照未将多个dump.rdb与maxlen属性合并
- django - 为什么 django 卡在加载不存在的模板上?
- reactjs - 在 React 中将函数从父类传递到子类中的函数
- mysql - MySQL 查询 - 数据未按预期显示,代码有问题
- php - 创建一个搜索算法,该算法在一个单独的数据库表中包含一些关键字,该数据库表链接到 Laravel 主表
- c# - 如何使用 Polly 根据响应内容重试 x 次,然后返回响应?
- ruby - Ruby - 如何找出一个数字是否在给定百分比容差的范围内?
- amazon-web-services - AWS S3:您尝试创建的存储桶数量超过了允许的数量
- python - Django Q Tasks - 将 Q_CLUSTER 放在设置文件之外
- javascript - Google Apps 脚本 - 如果表中的最后一列,则使用新行粘贴数据