Skip to main content

Questions about mapping URLs to Controllers and Actions.

MVC web application (like Ruby on Rails, ASP.NET MVC, etc) uses routes to map an arbitrary URL to a specific controller/action.

For example

http://example.com/foo/bar/23

Might pass an id 23 to controller foo, action bar.

Unusual URLs could also be mapped

Given controller places and intended action list, we can use routes to allow this URL:

http://example.com/my/places