Sign up ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I have a .htaccess file with the following code

<IfModule mod_rewrite.c>
    Options -MultiViews
    RewriteEngine On

    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.+)/$ http://%{HTTP_HOST}/$1 [R=301,L]

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

But when I visit my site I get this error

[client] 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.

The LogLevel debug doesn't give me a backtrace and I don't think increasing the Limit on internal recursion is wise.

Does anyone have experience with this type of error?

share|improve this question
With what URL are you testing this? Can you enable rewritelog? That should give you your answer. Also, if possible, try to put the rewriterules in your config, not in .htaccess – Krist van Besien Apr 14 '13 at 15:08
This means you have a loop in your redirect rules, Use 'LogLevel debug' to get a backtrace., please post such a backtrace ... – rcomblen Apr 14 '13 at 15:08
I'm testing with a domain name wich would automatically redirect to but the htaccess from laravel is not working on my server – alrightythen Apr 15 '13 at 7:25
I have LogLevel set to debug but I don't see any log with a backtrace. – alrightythen Apr 15 '13 at 7:25

1 Answer 1

Assume that the request is for /index.html.

Your first rewrite condition says "if the URL requested is not a directory, rewrite it with a redirect to itself with an added slash." So the URL will be rewritten with a redirect to /index.html/. Which will again be rewritten with an added slash, etc ad infinitum. This is why you get the error message.

share|improve this answer
hmm this is literally the htaccess laravel 4 uses, which must work. I don't get why it's not working on my server. – alrightythen Apr 15 '13 at 7:27

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.