In this post we are going to discuss about how to map multiple URLs to the same controller/Action by the custom route.

Below example shows how write custom route

Custom code must be place inside the RouteConfig.cs.

Explanation :

  •  MultipleUrls : Descripe the name of the route
  •  {phaseone,phasetwo} : controllers name with comma separator
  •  new { controller = “home”, action = “index”, id = “” } : It describe, where want to redirect for the above controllers

 OUTPUT :

multipleurls

Thanks to my friend manjunath for rise this question and make me find this solution