I have created a new Laravel project (v5.5) which is related to my main website. Due to SEO-technical considerations I want the link to be like this: <mainwebsite.com/laravel>
.
Both, <mainwebsite.com>
and <mainwebsite.com/laravel>
are deployed to an individual server. An Application Load Balancer redirects the traffic either to the main website or the new Laravel project.
The problem right now is that the Laravel app doesn't know that <mainwebsite.com/laravel>
must be seen as the project's root. (The route /
must go to <mainwebsite.com/laravel>
and not to <mainwebsite.com>
.
I've tried to add Route::prefix('laravel')->group() ...
to web.php, which does fix the routes, but then the app's public dir can't be accessed.
Using relative paths like "/css/app.css"
or "/laravel/css/app.css"
won't fix this.
Is there a better way to set this up or does anyone know how this must be done?