Setting up Index as the default route for a controller

I have a url

which I want to turn into

That could also be something like http://www.roadkillwiki.org/Page/my-url-with-spaces - the parameter is a string. The route setup I've tried is:

routes.MapRoute(
    "ControllerDefault",
    "{controller}/{id}",
    new { controller = "Page", action = "Index", id = UrlParameter.Optional }
);

However this is interfering with the default "id" route that MVC projects come with. Is there any way of achieving this?

7
задан frennky 9 March 2011 в 23:33
поделиться