Symptoms
The website will not load and may display an "ERR_TOO_MANY_REDIRECTS" message. Entries containing the following are found in the Apache error log.
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' to get a backtrace.
Description
Sites encounter ERR_TOO_MANY_REDIRECTS errors when one or more .htaccess rewrite rules are misconfigured or one or more scripts used by the site are misconfigured, resulting in an endless loop of redirects. To determine which is the cause, create a simple PHP script, such as the following, then browse to that page.
<?php
echo 'Hi!';
?>
If the simple PHP script encounters the redirect error, the problem is due to one or more rewrite rules in the .htaccess file. If the simple PHP script doesn't encounter the redirect error, the problem is with one or more of the scripts used by the site.
Workaround
If the redirect error is caused by one or more rewrite rules, correct or remove the problematic rules.
If the redirect error is caused by one or more scripts on the site, correct, remove, or update the problematic script. Typically, the problematic script will be one that was recently modified. You can use the find
command to locate recently updated files.
find /path/to/document/root -name '*.php' -mtime -.5
Please note that "/path/to/document/root" should be replaced with the full path to the domain's document root.
Comments
0 comments
Article is closed for comments.