Request exceeded redirects

Problems with the Windows version of XAMPP, questions, comments, and anything related.

Request exceeded redirects

Postby CFROG » 28. December 2009 22:00

I've been using xampp for a good while now with no issues. When I would go to http://localhost I used to see the xampp splash screen but now I get an internal server error. I checked the log files to see what is causing the error but I'm having a hard time making heads or tails out of it. I can access the rest of my directories in htdocs with no issues, xampp is the only one giving me a problem.

Can anyone point me in the right direction here? I've looked through other posts concerning the same issue but none of the advice seemed to help.
CFROG
 
Posts: 4
Joined: 28. December 2009 21:51

Re: Request exceeded redirects

Postby Izzy » 28. December 2009 22:07

Can you paste the relevant error 500 entries from your log file please?

http://localhost loads the index.php file in the \xampp\htdocs folder which redirects to an index.php file in the xampp\htdocs\xampp folder - http://localhost/xampp/index.php will go there directly.

Also is there a .htaccess file in the htdocs folder?
Izzy
 
Posts: 3344
Joined: 25. April 2006 17:06

Re: Request exceeded redirects

Postby CFROG » 28. December 2009 22:13

This is the error log:

[Mon Dec 28 16:08:53 2009] [error] [client ::1] 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.

This is the access log:

[28/Dec/2009:16:09:45 -0500] "PROPFIND /My%20Music/ HTTP/1.1" 500 866 "-" "Microsoft-WebDAV-MiniRedir/6.0.6002"
fe80::15ee:9e93:60dc:464f - - [28/Dec/2009:16:09:46 -0500] "PROPFIND /My%20Music HTTP/1.1" 500 866 "-" "Microsoft-WebDAV-MiniRedir/6.0.6002"
CFROG
 
Posts: 4
Joined: 28. December 2009 21:51

Re: Request exceeded redirects

Postby CFROG » 28. December 2009 22:31

Sorry for the double post. Here is the .htaccess from htdocs
Code: Select all
<IfModule mod_rewrite.c>
    RewriteEngine on
    RewriteRule    ^$    webroot/    [L]
    RewriteRule    (.*) webroot/$1    [L]
 </IfModule>
CFROG
 
Posts: 4
Joined: 28. December 2009 21:51

Re: Request exceeded redirects

Postby Izzy » 28. December 2009 22:44

Which XAMPP version and what Windows OS?

Use 'LogLevel debug' to get a backtrace.
This can be changed in the \xampp\apache\conf\httpd.conf file near line 284:
Code: Select all
LogLevel warn
Change to
Code: Select all
LogLevel debug
Save the file and restart Apache.

The error message appears to be related to the .htaccess file redirecting to the webroot folder - the webroot folder in XAMPP is called the DocumentRoot and is tied to the .htdocs folder by the httpd.conf file, so Apache does not know a folder named webroot.

Does this folder exist and should this .htaccess file be in the htdocs folder or in one of your other folders in the htdocs folder?

Try and rename the .htaccess or move it out of the htdocs folder and see if the error is no longer evident.
Izzy
 
Posts: 3344
Joined: 25. April 2006 17:06

Re: Request exceeded redirects

Postby glitzi85 » 28. December 2009 22:50

This is the problem:
Code: Select all
RewriteRule    (.*) webroot/$1

An user requests http://example.com/abcd this will be Rewritten to http://example.com/webroot/abcd and this will be rewritten to http://example.com/webroot/webroot/abcd. The [L] just stops the rewrite process in this round. Every rewritten URI will be parsed by the rewrite engine again.
You see the problem? You need a rule, that Rewrites everything, that starts NOT with webroot.

Code: Select all
<IfModule mod_rewrite.c>
    RewriteEngine on
    RewriteRule    ^$    webroot/    [L]
    RewriteCond %{REQUEST_URI} !^webroot
    RewriteRule    (.*) webroot/$1    [L]
</IfModule>


glitzi
User avatar
glitzi85
 
Posts: 1920
Joined: 05. March 2004 23:26
Location: Dahoim

Re: Request exceeded redirects

Postby CFROG » 28. December 2009 22:53

Izzy, the .htaccess was the problem. I'm really new to all of this so I never paid much mind to what the .htaccess was really doing or how to set it up even. That was my .htaccess for CakePHP, I must have got it mixed into the htdocs somehow.

Thanks for your help.
CFROG
 
Posts: 4
Joined: 28. December 2009 21:51

Re: Request exceeded redirects

Postby Izzy » 28. December 2009 22:59

Your welcome and a happy and prosperous New Year. :)
Izzy
 
Posts: 3344
Joined: 25. April 2006 17:06


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 60 guests