'Routing' is a pared-down pure-Ruby [[mod_rewrite]]-alike that can map URLs to controller/action/params and back.  It was added to Rails to make pretty URLs more configurable and to divorce us from the mod_rewrite requirement.

Routes are individual rules that map matching URLs to specific controllers and actions. Routes are configured in the @config/routes.rb@ file.

For more information see "this short book about Rails Routes.":http://manuals.rubyonrails.com/read/book/9

See also "Named Routes":http://wiki.rubyonrails.com/rails/show/NamedRoutes

bq. Is it possible to get a better and more canonical explanation of routes than this document provides? It is frustrating because this document is outside the wiki, and also because the API references this document so it really needs to be more comprehensive than I feel it is at present. Is there somewhere else I should be asking for this help? _-raymond_

h2. Examples

* "routes on Snippets":http://www.bigbold.com/snippets/tags/routes
* "Scott Barron walks through the routes used in EliteJournal":http://scott.elitists.net/users/scott/posts/elite-journals-new-routes
* "Typo's Route file":http://typo.leetsoft.com/trac.cgi/file/trunk/config/routes.rb
* http://blog.chanezon.com/articles/2005/05/20/rails-tip-create-a-route-with-an-arbitrary-number-of-parameters

If you're really sick and twisted, you might find the Rails route tests interesting reading. http://dev.rubyonrails.com/file/trunk/actionpack/test/controller/routing_tests.rb

category: [[Glossary]]
