This is fully customizable in the global.asax.cs
By default, a new MVC project adds the standard 'catchall' route which follows the convention: www.mysite.com/Controller/Action/ID
If you want something different, such as your example of www.mysite.com/about routing to HomeController.About() action, you would add the following route before the catchall one:
routes.MapRoute(
"My About Route",
"About",
new { controller = "Home", action = "About" }
);
You can add any number of custom routes that don't follow the MVC catchall convention, and can even replace the catchall route altogether if you desire.
EDIT:
To answer your comment below, no you don't necessarily need to add a route for every possible action, instead you can make a single route that fits a pattern of url's - just like the catchall one is doing. {controller} and {action} are special keywords.
Examples:
1.) Program has a SetController, but user's are accustomed to calling them Batches:
routes.MapRoute(
"Batch",
"Batch/{action}/{id}",
new { controller = "Set", action = "Index", id = UrlParameter.Optional }
);
2.) You prefer to group by the type of objects for the Controller, but have the url's be a verb/noun format:
- FlightController
- HotelController
- /find/flight /book/flight
- /find/hotel /reserve/hotel/Hilton
routes.MapRoute(
"NewCatchall",
"{action}/{controller}/{name}",
new { controller = "Home", action = "Index", name = UrlParameter.Optional }
);
The second example can replace the default route altogether, and all possible url's would fit its format. So nothing would continue on to check any other routes. It's important to know that routes are checked in order, and the first pattern that matches the request is used - the rest ignored.
These were useful to me when learning: