首页 > 解决方案 > AH00124:请求超出了 google-bot 请求的 10 个限制

问题描述

我的 PHP error.log 文件有以下错误

AH00124: Request exceeded the limit of 10 internal redirects due to probable configuration error.

运行 sudo lnav /var/log/apache2/access.log /var/log/apache2/error.log 后,它仅在 googlebot 尝试索引网站时发生

└66.249.65.71 - - [16/Apr/2020:10:55:21 +0000] "GET /robots.txt HTTP/1.1" 500 6650 "-" "Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)"                                                                                                            │
◆[Thu Apr 16 10:55:21.577195 2020] [core:error] [pid 6512] [client 66.249.65.71:41736] AH00124: Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug│

我已经搜索了可能的解决方案,并且大多数都指向 .htaccess 文件

Header set Access-Control-Allow-Origin '*'
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]

不知道我错过了什么!

标签: phpdebianapache2googlebot

解决方案


我设法通过使用跟踪问题来解决问题

LogLevel alert rewrite:trace3

在我网站的 Apache 2.4 .conf 文件中

我有一个子域来托管没有索引文件的静态缓存内容,Rewrite即使文件不存在,访问该站点时也会进入无限循环。由于它模仿您的主域,因此很难在 Apache 日志文件中检测到

"GET / HTTP/1.1" 

“/”实际上是 sub.example.com,它也可以是 apache 日志文件中的 example.com

注意:在为我的网站编制索引的所有搜索引擎中,只有 googlebot 尝试为子域编制索引


推荐阅读