I don’t think that what you do requires a special route handler.
For your "globalized" URIs, a regular MVC route will be executed with the restriction so that the parameter "locale" is equal to "en", "de", etc. The restriction will prevent non-global URIs from matching with the route.
For a non-global URI, create an all-all route that simply redirects to the URI of the local or set cookie.
Place the “globalized” route above the “all-all” route in Global.asax so that the “already globalized” URIs do not fall into the redirection.
You will need to create a new route handler if you want a specific URI pattern to trigger something that is not an action on the controller. But I do not think that you are dealing here.
source share