0

WE have a old application build in asp.net 2.0, After latest migration exercise to latest asp.net MVC 5 all is good.

The old application has a url like http://somehost.com/default.aspx which is being passed to many affiliates who redirects from there site to ours. It is difficult to tell every one to change the URL.

so how can I implement this change in global.asax file so that the old URL : http://somehost.com/default.aspx?affid=123 is automatically detected by system and redirected to

New URL: http://somehost.com/home/index?affid=123
ankur
  • 4,565
  • 14
  • 64
  • 100
  • You really should use a 404 page/route. Check out this answer: http://stackoverflow.com/questions/310580/how-can-i-make-a-catch-all-route-to-handle-404-page-not-found-queries-for-asp Or this one http://stackoverflow.com/questions/619895/how-can-i-properly-handle-404-in-asp-net-mvc/23830145#23830145" – Darren Wainwright Nov 30 '16 at 13:14
  • if there only single url with just query string change then you can use http://stackoverflow.com/questions/3197319/asp-net-mvc-how-to-redirect-a-non-www-to-www-and-vice-versa – vinayak hegde Nov 30 '16 at 13:24

0 Answers0