I have two ASP .Core MVC applications that are hosted under the same url.
I've managed to separate them with Nginx so that a certain path goes to app-2, while the rest goes to app-1:
http://host -> app-1
http://host/setup -> app-2
My problem comes when the user connects to app-2, as the application still thinks it's app-root is http://host.
This leads to the client encountering a 404 when for example style sheets are downloaded, since app-2.css exists under http://host/setup/css but the application searches in http://host/css.
The "include"-lines in the .cshtml file in app-2 look like this:
<link rel="stylesheet" type="text/css" href="@Url.Content("~/css/app-2.css")" asp-append-version="true" />
Is there some way of "overriding" or telling app-2 that ~ should refer to <host>/setup/css/ instead of <host>/css/?
I really don't want to hardcode it in case the url changes at some point.