I've installed Lumen and created a new project using de composer. I have de project folder under my Apache24/htdocs folder (I'm using Windows 10).
The 'localhost/myapp/public/' works fine. The problem appears when I create a new route, say '/test' return some string:
$app->get('/test', function () use ($app) {
return 'test'; });
Then, when I try 'localhost/myapp/public/test' I get a 404 error.
My htaccess is the default that comes with the project created:
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews
</IfModule>
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}]
My Apache config has the AllowOverride All and the LoadModule rewrite_module modules/mod_rewrite.so is enabled.
The suggestions in laravel 4 all routes except home result in 404 error were tried, but none of that solved the problem for me...
Any help?
RewriteBase /myapp/public
? – Mike Rockétt