Im running a Lumen app on Elastic beanstalk The index (home) page works but non of the others
Base url returns the index page. "Base url + /info" gives me 404
Iv checked the logs and can see nothing mentioned. Iv given the storage folder 777 permissions, also no joy. which is strange since the index page has been cached and is working.
The app works perfectly locally
Am I missing something obvious?
Thanks!
*****EDIT*****
More info:
public/htaccess
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews -Indexes
</IfModule>
RewriteEngine On
# Handle Authorization Header
RewriteCond %{HTTP:Authorization} .
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
# Redirect Trailing Slashes If Not A Folder...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} (.+)/$
RewriteRule ^ %1 [L,R=301]
# Handle Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
</IfModule>
routes
$router->get('/', 'HomeController@index');
$router->get('info', 'HomeController@info');
HomeController
public function index() {
return view('index');
}
public function info() {
return view('info');
}
Both the index and Info pages extend the app layout page which is located in resources/views/layouts
On an Ngingx server, such as Elastic beanstalk is, the server config has to be edited as described here: https://lumen.laravel.com/docs/5.1
In the server array add:
location / {
try_files $uri $uri/ /index.php?$query_string;
}