Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我发现我的一些开发网站已被 Google 索引。不知何故,robots.txt 被删除了。如果访问者是谷歌蜘蛛机器人或者访问是谷歌的推荐,我如何调整我的 .htaccess 以提供 410 状态?
你可以在你的.htaccess:
.htaccess
RewriteEngine On RewriteCond %{HTTP_USER_AGENT} Googlebot [OR] RewriteCond %{HTTP_REFERER} google RewriteRule ^ - [L,R=410]