I'm trying to create twitter.com/rob to go to a dynamic page (using account/viewuser) as well as allowing twitter.com/help to go to a help page (help/index).
The below code doesn't work in either order because the Default route handler always picks up ID as controller because controller/action/id are all optional.
Is there any way to do this without defining every page in the website up front in the global.asax.cs?
routes.MapRoute(
"Default", // Route name
"{controller}/{action}/{id}", // URL with parameters
new { controller = "Home", action = "Index", id = "" } // Parameter defaults
);
routes.MapRoute(
"UserHomepage", // Route name
"{id}", // URL with parameters
new { controller = "Account", action = "ViewUser", id = "" } // Parameter defaults
);