【发布时间】:2016-09-15 12:12:58
【问题描述】:
有很多关于如何防止 google bot 索引的 Stack Overflow 问题,例如,txt 文件。有这个:
robots.txt
User-agent: Googlebot Disallow: /*.txt$
.htaccess
<Files ~ "\.txt$">
Header set X-Robots-Tag "noindex, nofollow"
</Files>
但是,当试图阻止两种类型的文件被索引时,这两种方法的语法是什么?在我的情况下 - txt 和 doc。
【问题讨论】:
标签: apache .htaccess robots.txt googlebot