阻止file_get_content阻止谷歌机器人?

时间:2015-09-11 20:02:03

标签: php .htaccess googlebot

我看到此网站的[how to block curl or file_get_contents页面。该代码用于.htaccess,用于阻止php的file_get_contents。

RewriteEngine  On 
RewriteCond%  {HTTP_USER_AGENT}  ^ $ [OR] 
RewriteCond%  {HTTP_ACCEPT}  ^ $
RewriteRule  ^  -  [L, F]

我的问题是阻止谷歌机器人的可能性是什么?

1 个答案:

答案 0 :(得分:1)

您可以访问Google Webmaster Tools帐户和fetching a page on your site as Googlebot进行测试。那将是一个明确的考验。

但看起来代码阻止了没有价值的用户代理。 Google始终将自己标识为Googlebot。它还为v HTTP标头提供了值。所以我觉得你没事。

相关问题