LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 01-26-2005, 03:40 AM   #1
guarriman
Member
 
Registered: Nov 2004
Posts: 101

Rep: Reputation: 15
Apache: Request exceeded the limit of 10 internal redirects


Hi

I've just installed Apache 2.0.52, with:

./configure --prefix=/usr/local/httpd --enable-so --enable-modules=all

My httpd.conf includes:
-----------------------------------
<VirtualHost mydomain>
ServerAdmin f...@mydomain
DocumentRoot "/home/mydomain"
ServerName mydomain
ErrorLog logs/mydomain-error_log
CustomLog logs/mydomain-access_log common
DirectoryIndex index.php index.html index.html.var
<Directory "/home/mydomain">
php_flag allow_url_fopen 1
php_flag magic_quotes_gpc 0
RewriteEngine on
RewriteOptions MaxRedirects=15
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ /$1.php #<-------- RULE!!!
</Directory>
</VirtualHost>
---------------------------------
(I try to make Apache serve 'foo' as 'foo.php')

But when accessing 'http://mydomain/foo', I get no webpage,
but this error log:
----------------------------------
[Mon Jan 24 10:47:59 2005] [debug] mod_rewrite.c(1778): [client
192.168.2.101] mod_rewrite's internal redirect status: 10/15.
[Mon Jan 24 10:47:59 2005] [error] [client 192.168.2.101] 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 Jan 24 10:47:59 2005] [debug] core.c(2748): [client 192.168.2.101]
r->uri = /favicon.ico.php.php.php.php.php.php.php.php.php.php
[Mon Jan 24 10:47:59 2005] [debug] core.c(2754): [client 192.168.2.101]
redirected from r->uri =
/favicon.ico.php.php.php.php.php.php.php.php.php
[Mon Jan 24 10:47:59 2005] [debug] core.c(2754): [client 192.168.2.101]
redirected from r->uri = /favicon.ico.php.php.php.php.php.php.php.php
[Mon Jan 24 10:47:59 2005] [debug] core.c(2754): [client 192.168.2.101]
redirected from r->uri = /favicon.ico.php.php.php.php.php.php.php
--------------------------------

If I remove the line 'RewriteOptions MaxRedirects=15', I get
a very similar error:
----------------------------
[Wed Jan 24 10:31:29 2005] [debug] mod_rewrite.c(1778): [client 192.168.2.101] mod_rewrite's internal redirect status: 10/10.
[Wed Jan 24 10:31:29 2005] [error] [client 192.168.2.101] mod_rewrite: maximum number of internal redirects reached. Assuming configuration error. Use 'RewriteOptions MaxRedirects' to increase the limit if neccessary.
[Wed Jan 24 10:31:29 2005] [debug] mod_rewrite.c(1778): [client 192.168.2.101] mod_rewrite's internal redirect status: 0/10.
-------------------------------

What am I doing wrong? Thank you very much.
 
Old 01-26-2005, 08:06 AM   #2
hw-tph
Senior Member
 
Registered: Sep 2003
Location: Sweden
Distribution: Debian
Posts: 3,032

Rep: Reputation: 57
Your rule will rewrite any filename to filename.php, including filename.php itself (so it will become filename.php.php and then filename.php.php.php and so on). In the case in your logfile apache is trying to bastardize the name of the favicon.ico (little image that displays next to your bookmark) image.


Håkan
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
File size limit exceeded XaViaR Linux - General 4 09-21-2005 10:02 PM
redirection limit for this url is exceeded phpsharma Programming 3 07-16-2005 03:54 AM
file size limit exceeded mchitrakar Linux - General 2 10-12-2004 12:47 PM
File size limit exceeded npuetz Linux - General 5 10-06-2004 07:34 AM
File size limit exceeded... Faeroon Linux - General 20 01-02-2003 06:57 PM


All times are GMT -5. The time now is 09:44 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration