【问题标题】:Block file_get_content blocks the google bot?阻止 file_get_content 阻止谷歌机器人?
【发布时间】:2015-09-11 20:02:02
【问题描述】:

我看到了; 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]

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

【问题讨论】:

标签: php .htaccess googlebot


【解决方案1】:

您可以通过进入您的Google Webmaster Tools 帐户和fetching a page on your site as Googlebot 进行测试。那将是一个决定性的测试。

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

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2020-02-09
    • 2014-12-29
    • 1970-01-01
    • 1970-01-01
    • 2021-10-02
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多