I have a default routing so if I go to www.domain.com/app/ it's, for example, the HomeController. I have another action on the control, e.g. helloworld but if I go to www.domain.com/app/helloworld it fails with a 404 (expecting helloworld controller no doubt).
How can I can non-default actions on my default controller OR how can I map the url /app/helloworld to the helloworld action. My routing looks like this:
routes.MapRoute(
"Default", // Route name
"{controller}/{action}/{id}", // URL with parameters
new { controller = "Home", action = "Index", id = UrlParameter.Optional } // Parameter defaults
);
routes.MapRoute( //this fails with same 404 like it does when it's ommitted
"Hello", // Route name
"app/helloworld", // URL with parameters
new { controller = "Home", action = "HellowWorld", id = UrlParameter.Optional } // Parameter defaults
);
Basically I need:
/app/ => Controller = Home, Action = Index
/app/helloworld => Controller = Home, Action = HelloWorld, not Controller = HelloWorld, Action - Index
/app/other => Controller = Other, Action = Index