0

I have a controller and various action methods. I have url as:

http://localhost:2032/Info/person 

I have a requirement that if I enter any wrong controller and action in the URL, it should still redirect it to the above given URL.

Example-if I enter http://localhost:2032/asjjsjdj or http://localhost:2032/info/djwsk it should redirect to http://localhost:2032/Info/person

Please let me know how do I do that?

1 Answers1

0

You need to add on exception handler and redirect from the your predefined URL as mentioned below URL:

How can I properly handle 404 in ASP.NET MVC?

Community
  • 1
  • 1
Amit
  • 15,217
  • 8
  • 46
  • 68