title: .htaccess for a Laravel app installed in a subfolder
body: <p>I've a domain, like <code>www.example.com</code></p>
  
  <p>The main site is on FTP space visible as <code>/example.com</code></p>
  
  <p>I installed (copy/pasted, sigh... :(  ) my Laravel app under <code>/example.com/laravel_app</code>.</p>
  
  <p>I am able to open the laravel app, and it's fully working, if I access using full url <code>http://www.example.com/laravel_app/public/index.php</code>.</p>
  
  <p>The problem is that, obviously, I'd like to access it using only the path <code>http://www.example.com/laravel_app</code>.</p>
  
  <p>In the root of <code>laravel_app</code>, I tried to paste this <code>.htaccess</code></p>
  
  <pre><code>&lt;IfModule mod_rewrite.c&gt;
      RewriteEngine On
      RewriteRule ^(.*)$ public/$1 [L]
  &lt;/IfModule&gt;
  
  </code></pre>
  
  <p>While in the <code>/example.com/laravel_app/public</code> i'm using this `.htaccess</p>
  
  <pre><code>&lt;IfModule mod_rewrite.c&gt;
      &lt;IfModule mod_negotiation.c&gt;
          Options -MultiViews -Indexes
      &lt;/IfModule&gt;
  
      RewriteEngine On
      RewriteBase /laravel_app/
  
      # Handle Authorization Header
      RewriteCond %{HTTP:Authorization} .
      RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
  
      # Redirect Trailing Slashes If Not A Folder...
      RewriteCond %{REQUEST_FILENAME} !-d
      RewriteCond %{REQUEST_URI} (.+)/$
      RewriteRule ^ %1 [L,R=301]
  
      # Handle Front Controller...
      RewriteCond %{REQUEST_FILENAME} !-d
      RewriteCond %{REQUEST_FILENAME} !-f
      RewriteRule ^ index.php [L]
  &lt;/IfModule&gt;
  </code></pre>
  
  <p>So my question is NOT related the <code>.htaccess</code> of app's public folder, but the <code>.htaccess</code> for app's root folder.</p>
  
  <p>How can I succesfully serve</p>
  
  <p><code>http://www.example.com/laravel_app/public/index.php</code></p>
  
  <p>accessing</p>
  
  <p><code>http://www.example.com/laravel_app</code></p>
  
  <p>?</p>
  
  <p>Actually I got Laravel returning a 404</p>
  
  <p>I tried this variant (seen I some question very similar to this one)</p>
  
  <pre><code>&lt;IfModule mod_rewrite.c&gt;
      RewriteEngine on 
      RewriteCond %{REQUEST_FILENAME} !-f 
      RewriteCond %{REQUEST_FILENAME} !-d 
      RewriteRule ^(.*)$ public/index.php/$1 [L] 
  &lt;/IfModule&gt;
  </code></pre>
  
  <p>But with this I got apache returning a forbidden</p>