I created Admin Area inside my ASP.NET Core application and updated my routes like that:
app.UseMvc(routes =>
{
routes.MapRoute(name: \"areaRoute\",
Today similar question is asked (not duplicate because versions are different).
I can propose the same configuration to you, firstly, you must use nginx
on your localserver to redirect or rewrite the url on localserver to specific sub-path, so no need to configure .net application to do redirection just configure the route areas.
Mapping Subdomains to Areas in ASP.Net Core 3