I have asp.net webform website, which i have migrated to asp.net mvc.
Now I want to do 301 Permanent redirect for my old .aspx page request to asp.net mvc controller action.
Can someone explain in detail about how can i redirect .aspx page request to asp.net mvc controller/action.
Thank you.
Easiest way is just to call:
This will deliver a 301 to the browser.
EDIT:
So it looks like you’ve removed the ASPX pages, so the physical pages don’t exist anymore, causing the 404. You can still get around this by putting the code to handle this in your Global.asax, something like: