1

how would I configure my area to use a subdomain as the route?

E.g. publishers.domain.com pointers to area publishers.

Thanks

Darren
  • 10,631
  • 8
  • 42
  • 64

1 Answers1

0

You can go with this approach:

Is it possible to make an ASP.NET MVC route based on a subdomain?

Or you can make a simple helper:

public IHtmlString SubUrl(this UrlHelper urlHelper, string subDomain, string controller, string action, object options) {
    return subDomain + urlHelper.Action(action, controller, options);
}

In the View: Url.SubUrl("my.domain.com", ...);

Community
  • 1
  • 1
Paul
  • 12,392
  • 4
  • 48
  • 58