I have recently been working on a project where we reimplement an old web application with a new one. Since there has been an page on the same address before, there are also some old applications in other places linking to pages on the old site. For instance, the login.aspx file is linked to in a lot of places.
I will in my example use a link to the page login.aspx in my solution.
To get these links to work, I had (as far as I'm aware of) two options. To make a login.aspx and redirect in this file and add login.aspx to global.asax IgnoreRoute, or to map a new route in global.asax and redirect to my new login. The latter is the solution i went for.
To accomplish this all I had to do was to add the following to RegisterRoutes method in global asax:
routes.MapRoute("Handle login", "login.aspx", new { controller = "Login", action = "Index", id = "" });
Very easy, and now, every request for http://myapp/login.aspx is handled by http://myapp/login/index/