Open the GeneralAreaRegistration.cs file.
Find this:
context.MapRoute(
"General_default",
"General/{controller}/{action}/{id}",
new { action = "Index", id = UrlParameter.Optional }
);
... and replace with this:
context.MapRoute(null,
"{controller}/{action}/{id}",
new { controller = "General", action = "Index", id = UrlParameter.Optional }
);
Reply to comments:
Assuming you are using a URL http://www.mysite.com/members, and suppose this is in the MembersAreaRegistration.cs file:
context.MapRoute(
"Members_default",
"Members/{controller}/{action}/{id}",
new { controller = "Home", action = "Index", id = UrlParameter.Optional }
);
... then this should work. However, if you do not have a snippet controller = "Home"in MapRoute's default settings, then the URL should be http://www.mysite.com/members/home.
source
share