Error while trying to redirect . htaccess to a sub folder in Laravel 5.2

Asked

Viewed 45 times

0

I am using my Laravel 5.2 application in a wwww.com/application subfolder/

but I would not like "/public/" to be in the front, I am using it as follows in . htaccess

<IfModule mod_rewrite.c>
    RewriteEngine on
    RewriteCond %{REQUEST_URI} !^public
    RewriteRule ^(.*)$ public/$1 [L]
</IfModule>

Then when accessing the url I get the following error:

NotFoundHttpException in RouteCollection.php line 161: 

I believe it should be something simple to solve but I don’t know how, some suggestion?

  • Add the route you were supposed to access sff, how are you setting in Routes.php? Try RewriteRule ^(.*)$ /public/$1, with the / before the public

  • By adding the slash before I get :"Not Found The requested URL /public/ was not found on this server" I believe it is no problem on the route only in . htaccess

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.