What I want to achieve
- Mapping my normal domain e.g.
example.com
to no area if possible. - Mapping my subdomain e.g.
blog.example.com
to a area namedblog
.
What I have found
There are actually quite a lot of posts regarding to this topic, especially mapping subdomains to areas.
From SO:
- area-and-subdomain-routing
- asp-net-core-mapping-subdomains-to-areas
Others:
- danylkoweb.com
- benjii.me
- web.archive.org
And there are probably even more.
Problem
But there is one big problem, in ASP.Net Core 3 they changed a lot of things, one of them being the routing in general, see mircosoft's devblog. Basically they changed it so everything should now be endpoints.
All the classes e.g. MvcRouteHandler
and interfaces e.g. IRouter
are basically obsolete now, at least from my understanding. After a while googling around and diggin' in the GitHub repositories I couldn't find anything useful.
Additional information
- I am using
SDK 3.0.100-preview6-012264
, but trying to upgrade toSDK 3.0.100-preview7-012821
as soon as possible. - I am using a reserve proxy (nginx) which passes the request to the ASP.Net Core Server.