Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

so here is the error

[Mon Sep 30 00:09:53 2013] [error] [client 66.249.66.205] 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.
[Mon Sep 30 00:09:53 2013] [debug] core.c(3120): [client 66.249.66.205] r->uri = /home/mysitecom/domains/mysite.com/public_html/index.php
[Mon Sep 30 00:09:53 2013] [debug] core.c(3126): [client 66.249.66.205] redirected from r->uri = /home/mysitecom/domains/mysite.com/public_html/index.php
[Mon Sep 30 00:09:53 2013] [debug] core.c(3126): [client 66.249.66.205] redirected from r->uri = /home/mysitecom/domains/mysite.com/public_html/index.php
[Mon Sep 30 00:09:53 2013] [debug] core.c(3126): [client 66.249.66.205] redirected from r->uri = /home/mysitecom/domains/mysite.com/public_html/index.php
[Mon Sep 30 00:09:53 2013] [debug] core.c(3126): [client 66.249.66.205] redirected from r->uri = /home/mysitecom/domains/mysite.com/public_html/index.php
[Mon Sep 30 00:09:53 2013] [debug] core.c(3126): [client 66.249.66.205] redirected from r->uri = /home/mysitecom/domains/mysite.com/public_html/index.php
[Mon Sep 30 00:09:53 2013] [debug] core.c(3126): [client 66.249.66.205] redirected from r->uri = /home/mysitecom/domains/mysite.com/public_html/index.php
[Mon Sep 30 00:09:53 2013] [debug] core.c(3126): [client 66.249.66.205] redirected from r->uri = /home/mysitecom/domains/mysite.com/public_html/index.php
[Mon Sep 30 00:09:53 2013] [debug] core.c(3126): [client 66.249.66.205] redirected from r->uri = /home/mysitecom/domains/mysite.com/public_html/index.php
[Mon Sep 30 00:09:53 2013] [debug] core.c(3126): [client 66.249.66.205] redirected from r->uri = /home/mysitecom/domains/mysite.com/public_html/index.php
[Mon Sep 30 00:09:53 2013] [debug] core.c(3126): [client 66.249.66.205] redirected from r->uri = /images/2013/02/600x376_0.076827001313237200_pixnaz_ir_1.jpg

how can i find what is cuzing this ?

it seems a loop around index.php , with the exception of last one which is an image , most likely linked within one of my page (not index)

i'm using codeigniter which is a mvc framework and everything goes trough index.php file .... so it's a bit harder to understand where it goes wrong .

apparently it has something to do with htaccess (it's been mentioned in couple of blogs )

here is my htacc ... basically it removes index.php from all the links , nothing unusual

<IfModule mod_rewrite.c>
    RewriteEngine On

    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php/$1 [L]
</IfModule>

<IfModule !mod_rewrite.c>
    # If we don't have mod_rewrite installed, all 404's
    # can be sent to index.php, and everything works as normal.
    # Submitted by: ElliotHaughin

    ErrorDocument 404 index.php
</IfModule> 
AddType image/x-windows-bmp bmp

i have a dedicated server

share|improve this question

2 Answers 2

up vote 2 down vote accepted

You need to add an exception so that you are not rewriting index.php to index.php?/index.php. (Also, are you sure that you want a / after the ??)

Here's a RewriteCond to stop that loop:

RewriteCond %{REQUEST_URI} != /index.php/

It should be inserted before the RewriteRule.

share|improve this answer
    
thanx , im going to try it .. and actually the ? was extra , i've removed it .. but it wasn't really important –  max Oct 2 '13 at 13:38
    
but still , i have to ask why this is happening ... the sulotion might work but it shouldn't be like that in the first place –  max Oct 2 '13 at 14:02
    
is it possible your index.php is a symlink? if so add RewriteCond %{REQUEST_FILENAME} !-l to the conditions as well –  lsmooth Oct 2 '13 at 14:27
    
i get 500 Internal Server Error after adding new condition , my links are like this .. www.site.com/index.php/users/get and with current htacc my link are like www.site.com/users/get –  max Oct 2 '13 at 14:30
    
Look at your server logs. They are very likely to give you the answer. –  Jenny D Oct 2 '13 at 14:32

The reason for the loop is that apache creates an internal subrequest each time a rewrite is triggered in a .htaccess file. This is one of many reasons why rewrites in .htaccess should be avoided. So if you do have access to your httpd.conf put the rewrites there. If you can't put your rewrites in the config, if you really must use a .htaccess file then make sure to add a condition that breaks the loop.

share|improve this answer

Your Answer

 
discard

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.