I have a website with urls like this :
http://www.mysite.com/controller/action/id
I need to create urls for others languages (english), so I have used ALEX ADAMYAN implementation of the MultiCultureMvcRouteHandler. So now I have urls like this :
http://www.mysite.com/en/controller/action/id
http://www.mysite.com/fr/controller/action/id
but I need to keep my old urls has default one, ie to have :
http://www.mysite.com/en/controller/action/id
http://www.mysite.com/controller/action/id
So I’m wondering how I can modify the routes, in his implementation, alex loops the routes and add the en/fr parameter to all routes so it overwrites former routes, then former urls are dropped, what I want to avoid.
If I duplicate all the routes to keep one with fr/en and one without it doesn’t works, may be this is because the order is lost in the route collection ?
I solved this problem looping through all my languages:
Where langabbreviation likes “en” or “ru”.
The last route is for “default” “withoutlanguage” url like “www.site.com/controller/action” and you need to set up the default lang abbr for it (“en” in my case).
Hope it will help.