How to support leagcy urls(Web forms type) in asp.net mvc routing

Someone asked on Stack Overflow:

We have recently shifted to asp.net mvc, but we still need to support some legacy urls. What is the best way to handle this situation. Is it Application_PreRequestHandlerExecute() event in global.asax, that I need to use or is there any better way?

I posted the following answer, which was chosen as the accepted answer and received 1 upvote:

You can use the URL Rewrite module for IIS7. Scott Hanselman has a good post on using URL rewrite to to handle legacy URLs here.

Another option, I believe you can simply add a route that matches your old url syntax.


Originally posted on Stack Overflow — 1 upvotes (accepted answer). Licensed under CC BY-SA.

signed letter b

Dad. Geek. Gamer. Software developer. Cloud user. Old Car enthusiast.  Blogger.


Top Posts


profile for Nate on Stack Exchange, a network of free, community-driven Q&A sites
a proud member of the blue team of 512KB club
Thoughts, opinions, and ideas shared here are my own. © 2026 Nate Bross.