title: htaccess - Redirect to subfolder without changing browser URL
body: <p>I've a domain that contains a subfolder with the web app structure. I added a <code>.htaccess</code> on my root domain to point the public folder on my subfolder web app. It works fine, but when I type <code>www.example.com</code> the browser URL changes to <code>www.example.com/subfolder/public</code>, but I would like that it doesn't change. </p>
  
  <p>This is my <code>.htaccess</code>:</p>
  
  <pre><code>RewriteEngine On
  RewriteRule ^.*$ subfolder/public [NC,L]
  </code></pre>
  
  <h2>EDIT</h2>
  
  <p>This first .htaccess is used to redirect on subfolder/public, where there is an other .htaccess that makes all the works.</p>
  
  <p>Here the code of the second .htaccess located on <code>www.example.com/subfolder/public/</code>:</p>
  
  <pre><code>RewriteEngine On
  RewriteCond %{REQUEST_FILENAME} -s [OR]
  RewriteCond %{REQUEST_FILENAME} -l [OR]
  RewriteCond %{REQUEST_FILENAME} -d
  RewriteRule ^.*$ - [NC,L]
  RewriteRule ^.*$ index.php [NC,L]
  </code></pre>