我有一堆 ajaxified 链接,这些链接可以做一些事情,比如投票、投票、标记帖子——标准社区审核的东西。
问题是 googlebot 会抓取这些链接,然后投票赞成、反对并标记项目。
将此添加到 robots.txt 会阻止 googlebot 抓取这些链接吗?或者还有什么我需要做的吗?
User-agent: Googlebot
Disallow: /item/*/flag/
Disallow: /item/*/vote/
谢谢!
编辑:更改了发布方法,googlebot 仍在标记帖子。
语法是:
<a href="onclick="$.ajax({data:'authenticity_token=' + encodeURIComponent('blahblahblah'), dataType:'script', type:'post', url:'/item/flag/236?method=post'}); return false;">
有什么想法吗?