title: Rewrite rules for several laravel apps in the same Virtual Host
body: <p>I have an Apache2 virtual host where I'll be hosting several Laravel applications.</p>
  <p>The VH document root is <code>/home/user/applications/portal</code>.</p>
  <p>The laravel applications are in:</p>
  <pre><code>/home/user/applications/portal/larapps/larapp1
  /home/user/applications/portal/larapps/larapp2
  ...
  </code></pre>
  <p>I want the URLs to be like:</p>
  <pre><code>http://portal.com/larapp1/...
  http://portal.com/larapp2/...
  </code></pre>
  <p>So this is my config:</p>
  <pre><code>&lt;VirtualHost *:80&gt;
      ServerName portal.com
      DocumentRoot /home/user/applications/portal
  
      Alias /larapp1 /home/user/applications/portal/larapps/larapp1/public
      &lt;Directory /home/user/applications/portal/larapps/larapp1/public&gt;
          RewriteEngine On
          RewriteBase /larapps/larapp1/public/
          RewriteCond %{REQUEST_FILENAME} !-f
          RewriteCond %{REQUEST_FILENAME} !-d
          RewriteRule ^.*$ index.php [L]
      &lt;/Directory&gt;
  &lt;/VirtualHost&gt;
  </code></pre>
  <p>If the request is <code>http://portal.com/larapp1</code> then the route that matches is as I expect: <code>Route::get('/',...)</code>.</p>
  <p>But, inexpectedly, if I add any URI in the request, it doesn't do what I want. For example, if the request is <code>http://portal.com/larapp1/foo</code>, it doesn't match <code>Route::get('/foo',...)</code> but <code>Route::get('/larapp1/foo',...)</code>.</p>
  <p>What should I do so that routes are matched without the prefix <strong>/larapp1</strong>?</p>