I have a setup where I use one route with url's on the following format:
www.example.com/friendly-url-1
www.example.com/friendly-url-2
www.example.com/another-friendly-url
The route is defined like this:
routes.MapRoute("FriendlyUrl", "{name}",
new { controller = "FriendlyUrl", action = "Index", name = UrlParameter.Optional }
);
Name is an internal property in my application that lets me look up which controller should be used in a custom ControllerFactory, and change the name of the controller that is created (there is no actual controller called FriendlyUrl).
It works well if I only have one action per controller, but since action isn't part of the route, it always uses the default action. I want to have more than one action, but I'm not able to find a good way for me to write logic that controls which action should be used for each request. Is it possible?