title: Laravel routing triggers 500 error on subdomain
body: <p>I am trying to put my laravel project on a live server. It is supposed to run on subdomain <a href="http://api.domain.com" rel="nofollow noreferrer">http://api.domain.com</a>. The problem is it shows 500 internal error on any route except:</p>
  
  <pre><code>Route::get('/', function () {
      return view('welcome');
  });
  </code></pre>
  
  <p>Folder structure:</p>
  
  <p>/</p>
  
  <p>--laravel</p>
  
  <p>--subdoms</p>
  
  <p>----api</p>
  
  <p>--www</p>
  
  <p>When I put content of public folder of laravel project into www folder it runs on domain.com perfectly, database, authenticating, routing, it works.</p>
  
  <p>When I put that content into api folder and I visit api.domain.com it loads welcome view. But when I add another route:</p>
  
  <pre><code>Route::get('testing', function() {
      return "Tested.";
  });
  </code></pre>
  
  <p>This shows 500 internal error.</p>
  
  <p>Thank you for any feedback.</p>
  
  <p>Edit: my .htaccess file in public:</p>
  
  <pre><code>&lt;IfModule mod_rewrite.c&gt;
  
  RewriteEngine On
  
  # Redirect Trailing Slashes If Not A Folder...
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule ^(.*)/$ /$1 [L,R=301]
  
  # Handle Front Controller...
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteRule ^ index.php [L]
  
  # Handle Authorization Header
  RewriteCond %{HTTP:Authorization} .
  RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
  &lt;/IfModule&gt; 
  </code></pre>