I have a big problem. I work on an application in localhost with Lumen framework. My work environment is on Wamp (Windows).
Lumen requires the root to be in the
Ok, after days of search, I have found the solution.
Add a .htaccess
file in the root of the application and add this in this file :
RewriteEngine On
RewriteCond %{THE_REQUEST} /public/([^\s?]*) [NC]
RewriteRule ^ %1 [L,NE,R=302]
RewriteRule ^((?!public/).*)$ public/$1 [L,NC]
Assuming you haven't touched the original architecture of Lumen, and that public data is still in the same place : the public/
folder
EDIT :
With the last version of Lumen and Laravel, you just could write it in the .htaccess
file :
RewriteEngine On
RewriteRule ^(.*)$ public/$1 [L]
Or follow the second method of this tutorial