Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Am trying to use laravel to build a site but my routes all redirect to the homepage. Apache error logs show this

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.

And the .htaccess file is this

<IfModule mod_rewrite.c>
    Options -MultiViews
    Options +FollowSymLinks

    RewriteEngine On
    RewriteBase /

    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d

    RewriteRule ^(.*)$ index.php/$1 [L]

The webroot has multiple sub-folders which are document roots for different domains. Am working with one of these sub-folders.

What is causing this error and how can it be fixed

share|improve this question

When a RewriteRule matches in a directory context (which a .htaccess file is) the resulting subsitution gets resubmitted in a sub request.

So what happens is that when you request "foo" it gets rewritten to index.php/foo this then gets resubmitted as a subreqeusts, matches again and gets rewritten to index.php/index.php/foo etc, until the maximum internal redirect limit is reached.

Why don't you use the .htaccess file that comes with laravel? This one uses:

<IfModule mod_rewrite.c>
    Options -MultiViews
    RewriteEngine On

    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^index.php [L]

And that should not lead to loops.

share|improve this answer
I used the default .htacess file and still had the same issue – MrFoh Jun 30 '13 at 8:51
Can you tell us a bit more about your config? Is there an actualy index.php in the same directory where this .htaccess file is? – Krist van Besien Jun 30 '13 at 8:55
Yes the .htaccess and index.php are in the same directory. /.htaccess /index.php /css /js /img – MrFoh Jun 30 '13 at 8:59
Should there really be a space after the ^ in ^ index.php [L]? – Jenny D Jun 30 '13 at 10:30

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.