Define custom route to hide the action name from page url


Hi, I need a help with creating custom routes in episerver7.

My route definition in MVC would look something like this:




            new { controller = "ListingPage", action = "Index", page = UrlParameter.Optional }


What I want to achieve is just not to show “Index” as action name in page url for the Index action of ListingPageController. So, in MVC routing logic, instead of my custom url should be:

My default route mapping for episerver is:

var segments = "{language}/{node}/{action}/{page}";

var defaults = new { action = "Index", page = 1 };

I understand that I have to change this episerver custom route definition, but everithing I try give me 404 error.

Please help, thanks :)

Jan 29, 2013 11:25

Guys, can anybody help me with this routing problem?

Jan 31, 2013 17:26
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.