I've been trying to create a link that includes the subdomain to look like this batman.website.com, but instead it generates this website.com/?subdomain=batman
I'm generating the link through this method
@Html.RouteLink("Link", new { controller = "home", subdomain = activity.From.Username, id = activity.PostId, action = "post" })
and my routing routeconfig class looks like this
public static void RegisterRoutes(RouteCollection routes) {
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
routes.Add(new SubdomainRoute());
}
}
the subdomain route is heavily based off of this http://benjii.me/2015/02/subdomain-routing-in-asp-net-mvc/
Could someone point me in the right direction to format the link correctly