title: Laravel always return 404
body: <p>I use Laravel as backend (API REST) and AngularJS as frontend (consuming API).
  I would like to have redirects:</p>
  
  <pre><code>/api --&gt; /backend/public (Laravel)
  /    --&gt; /frontend/app   (AngularJs)
  </code></pre>
  
  <p>Frontend runs without problem, but Laravel always return 404 for existing routes (NotFoundHttpException in RouteCollection.php).</p>
  
  <p>Where I make a mistake?</p>
  
  <p>My folder structure:</p>
  
  <pre><code>/var/www
  -- .htaccess (1)
  -- frontend
  ---- app
  ------ index.html
  ------ .htaccess (2)
  -- backend
  ---- public
  ------ index.php
  ------ .htaccess (3)
  </code></pre>
  
  <p>.htaccess (1)</p>
  
  <pre><code>&lt;IfModule mod_rewrite.c&gt;
     &lt;IfModule mod_negotiation.c&gt;
        Options -MultiViews
     &lt;/IfModule&gt;
  
     RewriteEngine On
  
     # Redirect Trailing Slashes...
     RewriteRule ^(.*)/$ /$1 [L,R=301]
  
     # Backend
     RewriteRule ^api(.*) backend/public/$1 [L]
  
     # Frontend
     RewriteRule ^(.*) frontend/app/$1 [L]
  &lt;/IfModule&gt;
  </code></pre>
  
  <p>.htaccess (2)</p>
  
  <pre><code>&lt;IfModule mod_rewrite.c&gt;
      &lt;IfModule mod_negotiation.c&gt;
          Options -MultiViews
      &lt;/IfModule&gt;
  
      RewriteEngine On
  
      # Handle Front Controller...
      RewriteCond %{REQUEST_FILENAME} !-d
      RewriteCond %{REQUEST_FILENAME} !-f
      RewriteRule ^ index.html [L]
  &lt;/IfModule&gt;
  </code></pre>
  
  <p>.htaccess (3)</p>
  
  <pre><code>&lt;IfModule mod_rewrite.c&gt;
      &lt;IfModule mod_negotiation.c&gt;
          Options -MultiViews
      &lt;/IfModule&gt;
  
      RewriteEngine On
  
      RewriteBase /api/
  
      # Redirect Trailing Slashes...
      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>Apache configuration</p>
  
  <pre><code>&lt;VirtualHost *:80&gt;
      ...
      DocumentRoot /var/www/
      &lt;Directory /&gt;
          Options FollowSymLinks
          AllowOverride All
          Order allow,deny
          Allow from all
      &lt;/Directory&gt;
      ...
  &lt;/VirtualHost&gt;
  </code></pre>
  
  <p>Part of <code>backend/app/Http/routes.php</code></p>
  
  <pre><code>&lt;?php
  
  Route::get('/', function()
  {
      return 'Hello World';
  });
  
  Route::get('/test', function()
  {
      return 'Hello Test';
  });
  </code></pre>
  
  <p>Every request to backend (<code>http://domain.com/api*</code>) return <code>NotFoundHttpException in RouteCollection.php line 145</code> from Laravel (so <code>backend/public/index.php</code> is running), for example:</p>
  
  <pre><code>http://domain.com/api
  http://domain.com/api/test
  </code></pre>
  
  <p>Thank you for your time.</p>