阻止 file_get_content 阻止 google 机器人?
Block file_get_content blocks the google bot?
我看到了; 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]
我的问题是也阻止 google 机器人的可能性有多大?
您可以进入 Google Webmaster Tools account and fetching a page on your site as Googlebot 进行测试。那将是一个决定性的测试。
但看起来该代码正在阻止没有价值的用户代理。 Google 始终将自己标识为 Googlebot。它还为 v
HTTP header 提供了一个值。所以我觉得你会没事的。
我看到了; 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]
我的问题是也阻止 google 机器人的可能性有多大?
您可以进入 Google Webmaster Tools account and fetching a page on your site as Googlebot 进行测试。那将是一个决定性的测试。
但看起来该代码正在阻止没有价值的用户代理。 Google 始终将自己标识为 Googlebot。它还为 v
HTTP header 提供了一个值。所以我觉得你会没事的。