I am running MVC in a subdomain
http://test.domain.com , which points to the / Test directory in my webhost4life account.
Html.ActionLink("About", "About", "Home")
he refers to
http://test.domain.com/Test/Home/About - which gives 404
link should be.
http://test.domain.com/Home/About
Is there a way to override ActionLink to omit / Test to render?
thanks
Experiment 1
I added a route to the table like this ...
routes.MapRoute( "Test", // Route name "Test/{controller}/{action}/{id}", // URL with parameters new { controller = "Home", action = "Index", id = "" } // Parameter defaults );
and now the action link displays such links. http://test.domain.com/Test/Test/Home/About/ when clicked, it does not give 404, but gives a Home control About the action.
Result
No longer broken links, but the site displays ugly URLs.
source share