I'm starting a port of an existing ASP.NET Web Forms CMS to ASP.NET MVC and want to get the routing right from the start.
Note: it isn't important to have the exact same URL structure.
I think this answer is close to what I'm looking for but would like some additional input should anyone have it.
The current URL struction is like:
?Content=News/CurrentNews/This_is_a_news_article
?Content=Corporate/About_Us/Overview
etc etc
I would like to add an optional language paramater and keep a similar structure in MVC. So something like:
News/CurrentNews/This-is-a-news-article
en/News/CurrentNews/This-is-a-news-articleedit/News/CurrentNews/This-is-a-news-article
edit/en/News/CurrentNews/This-is-a-news-article
or am I better with the reverse?
News/CurrentNews/This-is-a-news-article/edit
en/News/CurrentNews/This-is-a-news-article/edit
I think this way (with action on end) requries a route for every scenario from other questions I've read.
The other point is that the existing URLS are done like that for SEO and bread crumb generation. ie the URL shows the current navigation path.
I could just show the current page in the URL and build the bread crumbs from database separatly.
Like:
en/This-is-a-news-article
with crumb
Home > News > Current News > This is a news article
Overall thoughts and solutions? Should I just start with a custom routing class for maximum flexibility?