This is probably a simple question, but I just can't get it to work.
I have this route specified in my RouteConfig
routes.MapRoute(
name: "DefaultSiteRoute",
url: "{accountid}/{hostname}/{controller}/{action}/{id}",
defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional, accountid = UrlParameter.Optional, hostname = UrlParameter.Optional }
);
And it works great for a url like this
/123456/www.test.com/
or
/123456/www.test.com/Controller/Action
but he can't handle it
/123456/www.test.com
I get IIS 404
What's more strange, if I call Url.Actionfor this route using the default controller and action (i.e. Home / Index), it creates a URL without a trailing slash, which it then doesn't recognize. I really need it to work with and without backside.