title: htaccess, mod_Rewrite, cakephp
body: <p>I've been stuck for a few hours over this. I found lots of information online but nothing that solved my issue.</p>
  
  <p>I'm hosted on Dreamhost with a custom PHP installation (5.2.14).
  The site returns a 500 Internal Server Error with this .htaccess file.</p>
  
  <p>It looks like the rewrite rule is also applied to my php.cgi file but I don't know how to avoid that.</p>
  
  <p>My log file shows that there is an infinite loop somewhere "Request exceeded the limit of 10 internal redirects due to probable configuration error".</p>
  
  <pre><code>&lt;IfModule mod_actions.c&gt;
      Options +ExecCGI
      AddHandler php-cgi .php
      Action php-cgi /cgi-bin/php.cgi
      &lt;/IfModule&gt;
  
      &lt;FilesMatch "^php5?\.(ini|cgi)$"&gt;
      Order Deny,Allow
      Deny from All
      Allow from env=REDIRECT_STATUS
      &lt;/FilesMatch&gt;
  
      RewriteEngine on
      RewriteBase /
      RewriteRule    ^$ app/webroot/    [L]   
      RewriteRule    (.*) app/webroot/$1 [L]
  </code></pre>
  
  <p>app/.htaccess :</p>
  
  <pre><code>   RewriteEngine On
     RewriteBase /
     RewriteRule    ^$    webroot/    [L]    
     RewriteRule    (.*) webroot/$1    [L]
  </code></pre>
  
  <p>And app/webroot/.htaccess</p>
  
  <pre><code>    RewriteEngine On    
      RewriteBase /    
      RewriteCond %{REQUEST_FILENAME} !-d    
      RewriteCond %{REQUEST_FILENAME} !-f    
      RewriteRule ^(.*)$ index.php?url=$1 [QSA,L]
  </code></pre>
  
  <p>Any help would be appreciated!
  Thanks.</p>