example.com
to no area if possible.blog.example.com
to a area named blog
.There are actually quite a lot of posts regarding to this topic, especially mapping subdomains to areas.
From SO:
Others:
And there are probably even more.
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.
SDK 3.0.100-preview6-012264
, but trying to upgrade to
SDK 3.0.100-preview7-012821
as soon as possible.A subdomain is a domain that is part of a larger domain. For example, if the root domain is example.com, some subdomains that could be used are blog.example.com, news.example.com, updates.example.com. You can map a subdomain or root domain to your Typepad blog.
Subdomain routing is the same as routing prefixing, but it's scoped by subdomain instead of route prefix. There are two primary uses for this. First, you may want to present different sections of the application (or entirely different applications) to different subdomains.
A subdomain is a prefix added to a domain name to separate a section of your website. Site owners primarily use subdomains to manage extensive sections that require their own content hierarchy, such as online stores, blogs or support platforms. Subdomains function as a separate website from its domain.
You said all requests pass on nginx
but nothing said about nginx redirection, did you try to use nginx
to do that, just redirect the sub-domain to domain using /etc/nginx/nginx.conf
.
server {
server_name sub.domain.co;
location / {
return 301 $scheme://domain.co/BlogSite$request_uri;
}
}
(BlogSite
is your area routing on ASP.Net Core Server.)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With