Problem with rewrite an url in Laravel

lakamark

Oct 30th, 2016 03:03 PM

Problem with public root in Laravel.

 

I try to rewrite the url in Laravel with only .htacess file in my root of my Laravel Project : 

(I use the version 5.3 of Laravel Framework)

<IfModule mod_rewrite.c>
  RewriteEngine On
  RewriteRule ^(.*)$ public/$1 [L]
</IfModule>

I have an error :

NotFoundHttpException in RouteCollection.php line 161:

Thank your.

 

mark

Nov 27th, 2016 04:26 PM

To solve this I need a few informations:

 

  1. Where is your Laravel application placed
  2. What url are you visiting when getting this error
  3. What does your routes.php file look like (web.php in newer versions of Laravel)