title: Weird behavior: Request exceeded the limit of 10 internal redirects due to probable configuration error
body: <p>I have this Apache virtual host definition:</p>
  
  <pre><code>&lt;VirtualHost *:80&gt;
      ServerName server1.qa.com
      ServerAlias server2.qa.com
      ServerAlias server3.qa.com
  
      DirectoryIndex app_dev.php
  
      DocumentRoot /var/www/html/web
      &lt;Directory /var/www/html/web&gt;
          # enable the .htaccess rewrites
          AllowOverride All
          Order allow,deny
          Allow from All
      &lt;/Directory&gt;
  
      ErrorLog /var/log/httpd/error.log
  
      LogFormat "%h %l %t \"%r\" \"%{X-PDONE-SESSION-ID}i\" %&gt;s %b" common
      CustomLog /var/log/httpd/access.log common
  &lt;/VirtualHost&gt;
  </code></pre>
  
  <p>If I call <code>http://server1.qa.com</code> without <code>app_dev.php</code> I end with this error:</p>
  
  <blockquote>
    <p>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.</p>
  </blockquote>
  
  <p>If I call instead <code>http://server1.qa.com/app_dev.php</code> all is good and app works. Where is the problem? This is a Symfony 2.7 project and I'm trying to setup the <code>DirectoryIndex</code> for that path, any advice?</p>
  
  <p>This is the <code>.htaccess</code> definition:</p>
  
  <pre><code>DirectoryIndex app.php
  
  &lt;IfModule mod_negotiation.c&gt;
      Options -MultiViews
  &lt;/IfModule&gt;
  
  &lt;IfModule mod_rewrite.c&gt;
      RewriteEngine On
  
      RewriteCond %{REQUEST_URI}::$1 ^(/.+)/(.*)::\2$
      RewriteRule ^(.*) - [E=BASE:%1]
  
      RewriteCond %{HTTP:Authorization} .
      RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
  
      RewriteCond %{ENV:REDIRECT_STATUS} ^$
      RewriteRule ^app\.php(/(.*)|$) %{ENV:BASE}/$2 [R=301,L]
  
      RewriteCond %{REQUEST_FILENAME} -f
      RewriteRule .? - [L]
  
      RewriteRule .? %{ENV:BASE}/app.php [L]
  &lt;/IfModule&gt;
  </code></pre>
  
  <p><strong>access.log</strong></p>
  
  <p>There are nothing weird or helpful in <code>access.log</code> as seeing in the lines below:</p>
  
  <pre><code>// called server1.qa.com
  
  [04/Sep/2015:12:25:09 -0400] "GET / HTTP/1.1" 500 618
  
  // called server1.qa.com/app_dev.php
  [04/Sep/2015:12:25:14 -0400] "GET /app_dev.php HTTP/1.1" 302 340
  [04/Sep/2015:12:25:14 -0400] "GET /app_dev.php/admin/login HTTP/1.1" 302 416
  [04/Sep/2015:12:25:15 -0400] "GET /app_dev.php/login HTTP/1.1" 200 21521
  [04/Sep/2015:12:25:16 -0400] "GET /app_dev.php/_wdt/c84bab HTTP/1.1" 200 40961
  </code></pre>