Please excuse the confusing title ;)
We've built an ASP.NET MVC application to replace our "old" ASP.NET webforms monster. We still want to support some of the old URLs used there, because these may still float around in E-Mails etc. somewhere out there.
For example: Our old system used the URL ~/Password.aspx, the URL in the new MVC system is ~/Home/Password.
To support these old URLs, we just added them to the route table, like
routes.MapRoute(
"Password",
"Password.aspx",
new {
controller = "Home",
action = "Password",
id = ""
}
);
This works great, but whenever we use Url.Action("Password", "Home") in our code, it generates the old URL ("~/Password.aspx" instead of "~/Home/Password"). Since we want to slowly phase out the old URLs, it would be nice if the MVC routes still "understood" the old URLs but only use/write the new ones.
Is there a way to achieve this?