title: Cakephp: Remove /app/webroot on index with .htaccess
body: <p>I have a small problem of configuration with my .htaccess files:</p>
  
  <p>Explanation of the problem:</p>
  
  <ul>
  <li>The cakephp document root is on the root where my domain points : www.example.com</li>
  <li>When I go to www.example.com it redirects to www.example.com/app/webroot</li>
  <li>Everything works fine when I browse into deeper directories eg: www.example.com/Controller/action will not have app/webroot on the url.</li>
  </ul>
  
  <p>My .htaccess:</p>
  
  <p>Root:</p>
  
  <pre><code>&lt;IfModule mod_rewrite.c&gt;
     RewriteEngine on
     RewriteBase /
     RewriteRule    ^$ app/webroot    [L]
     RewriteRule    (.*) app/webroot/$1 [L]
  
  &lt;/IfModule&gt;
  </code></pre>
  
  <p>/app:</p>
  
  <pre><code>&lt;IfModule mod_rewrite.c&gt;
      RewriteEngine on
      RewriteRule    ^$    webroot/    [L]
      RewriteRule    (.*) webroot/$1    [L]
  &lt;/IfModule&gt;
  </code></pre>
  
  <p>/app/webroot</p>
  
  <pre><code>&lt;IfModule mod_rewrite.c&gt;
      RewriteEngine On
      RewriteCond %{REQUEST_FILENAME} !-d
      RewriteCond %{REQUEST_FILENAME} !-f
      RewriteRule ^ index.php [L]
  &lt;/IfModule&gt;
  </code></pre>