Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

914
Views
AH00124: Request exceeded the limit of 10 internal redirects due to probable configuration error - APACHE LOG

I am running my AWS Elastic Beanstalk Application

PHP 5.6 running on 64bit Amazon Linux/2.9.4

Every time i got this Warning in my apache 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.

I belive could be my .htaccess , this is my code:

ErrorDocument 404 /404.html
Options -Indexes
RewriteEngine On

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$/?$  %{REQUEST_FILENAME}\.php [NC,L]

## EXPIRES CACHING ##
<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType application/pdf "access plus 1 month"
ExpiresByType application/x-shockwave-flash "access plus 1 month"
ExpiresByType image/x-icon "access plus 1 month"
</IfModule>

<IfModule mod_headers.c>
   Header unset ETag
</IfModule>
FileETag None
<IfModule mod_headers.c>
   Header unset Last-Modified
</IfModule>

Any ideia about this error?

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$/?$  %{REQUEST_FILENAME}\.php [NC,L]

Your rule to append the .php file extension is incorrect. You are effectively rewriting to a non-existent file... repeatedly. Try the following instead:

# Append .php file extension if omitted and destination file exists
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI}.php -f
RewriteRule !\.\w{2,4}$ %{REQUEST_URI}.php [L]

The above states... for any request that does not already have a file-extension, it tests to see if a file exists with the .php extension exists before internally rewriting to it.

There's no need to backslash escape literal dots in the RewriteRule substitution, since this is an "ordinary" string (not a regex).

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!