title: pretty urls laravel 5.4
body: <p>Hi I am facing issues with settng pretty urls withput public in url but it is not working for me.</p>
  
  <p>I already tried </p>
  
  <p><a href="https://stackoverflow.com/questions/37718237/laravel-5-2-pretty-urls">Laravel 5.2 Pretty URLs</a>,
  <a href="https://stackoverflow.com/questions/28364496/laravel-5-remove-public-from-url">Laravel 5 - Remove public from URL</a></p>
  
  <p>and more similar urls but nothing seems to work for me.</p>
  
  <p>I am using wamp, windows 8</p>
  
  <p>I have make sure mod_rewrite is on, and is working properly.</p>
  
  <p>Here is my htaccess on root.</p>
  
  <pre><code>RewriteEngine On
  RewriteRule ^(.*)$ public/$1 [L]
  </code></pre>
  
  <p>my htaccess in test inside public folder</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 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>
  
  <p>I have also tried pasting the htacess from public folder on root folder and removed the one from public folder but it dint work </p>
  
  <p>actually the error which occurs is that my routes file skips all the patterns say if I have something like Route::get('/api/login', 'api@login') then it does works with urls containing public but when I remove public from url all the patterns are skipped. and it shows 404</p>
  
  <p>I made sure all the requests are reaching public/index.php and mysterious thing is that when I print </p>
  
  <pre><code>var_dump(Request::root());
  </code></pre>
  
  <p>in routes.php it for url with public it says <a href="http://localhost/folderName/subFolderName/public" rel="nofollow noreferrer">http://localhost/folderName/subFolderName/public</a> but for the urls without public it says <a href="http://localhost/" rel="nofollow noreferrer">http://localhost/</a> and I think this is the reason why my patterns in routes file are not working.</p>
  
  <p>P.S. I have set the title <code>pretty urls laravel 5.4</code> instead of <code>laravel routes not working</code> because I think it is .htaccess which I needs to configure properly to get this working.</p>
  
  <p>I do not want to change the folder structure because I believe in that there is some reason for which it is like this and There should be some work around for this.</p>
  
  <p>Regarding setting vhosts I wont be able to do this on server (For I do not have the rights) so there is no use of setting a vhost on local as a work around as in login run I have to solve this.</p>