I need to deploy really simple laravel 7 application to Elasticbeanstalk, I did everything just like this tutorial
Everything is going fine until I click on any other route except for the /
route.
http://laravelbooksystem-env.eba-vmyh6fvn.us-east-2.elasticbeanstalk.com/ (working)
http://laravelbooksystem-env.eba-vmyh6fvn.us-east-2.elasticbeanstalk.com/experts (Not working)
web.php
Route::get('/', function () {
return view('welcome');
});
Route::get('/experts', 'ExpertsController@index');
Route::get('/experts/{id}/show', 'ExpertsController@show');
Route::get('/experts/{id}/book', 'AppointmentsController@display');
Route::post('/appointment/{id}', 'AppointmentsController@store');
.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>
.ebextentions
container_commands:
01_clear_config:
command: "php artisan config:clear"
02_clear_cache:
command: "php artisan cache:clear"
03_build_db:
command: "php artisan migrate --force"
04_seed:
command: "php artisan db:seed --force"
Any clues on how to solve this?