Re: Apache: Request exceeded the limit of 10 internal redirects

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



James Guarriman wrote:
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

The above condition matches favicon.ico because it's neither directory or file, so it's rewritten to favicon.ico.php, that again matches the above condition...etc. So you need to come up with regexp that does not match if the file extension is .php


</Directory>
</VirtualHost>
---------------------------------
(I try to make Apache serve 'foo' as 'foo.php')

-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux