ZF-7477: lots of internal redirects when try to use zend framework in an alias


Working Environment : Apache Server version 2.2.11 , PHP version 5.2.9.

I made an alias on my apache server, with this configuraion:

Alias /mysite/ "somewhere_in_my_disk/public/" 

    Options Indexes FollowSymLinks MultiViews
    AllowOverride all
    Allow from all

Then I made a controller named loginController in application/controllers. it has an action named index. When I tried to have direct access to it ( using url: http://localhost/mysite/login/index or http://localhost/mysite/login/ ), an internal server error occurred:

Apache error log:

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

Also, I could have indirect access to this action controller like this:

<?php $this->action('index', 'login');?>

Then I changed the alias into VirtualHost. and everything was OK.

The virtual host configuraion:


ServerName quickstart.localhost
DocumentRoot somewhere_in_my_disk/public

AllowOverride All
Allow from all

And this is my .htaccess settings:

SetEnv APPLICATION_ENV development

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^.*$ index.php [NC,L]


Not an Issue. This is a misconfiguration of apache which is out of the scope of the Zend Framework, during your endless redirects there will never be a php file called.