ActionController::Routing::Routes.draw do |map| # The priority is based upon order of creation: first created -> highest priority. map.connect '', :controller => 'entry', :action => 'by_channel', :pseudolabel => 'Front_Page' map.connect 'atom', :controller => 'entry', :action => 'by_channel_atom', :pseudolabel => 'Front_Page' map.connect 'log/:pseudolabel', :controller => 'entry', :action => 'by_channel' map.connect 'log/:pseudolabel/atom', :controller => 'entry', :action => 'by_channel_atom' map.connect 'tag/:term', :controller => 'entry', :action => 'by_category', :requirements => {:term => /.*/} map.connect 'tag/:term/atom', :controller => 'entry', :action => 'by_category_atom', :requirements => {:term => /.*/} #characters not allowed in longid: / , ' " . ! ? \ [space] map.connect ':year/:month/:day/:longid', :controller => 'entry', :action => 'entry', :requirements => {:longid => /[^\/,'".!?\\ ]+/ } map.connect ':year/:month/:day/:longid/atom', :controller => 'entry', :action => 'entry_atom', :requirements => {:longid => /[^\/,'".!?\\ ]+/ } map.connect 'everything', :controller => 'entry', :action => 'everything' map.connect 'everything/atom', :controller => 'entry', :action => 'everything_atom' map.connect 'collections', :controller => 'entry', :action => 'collections' map.connect 'collections/atom', :controller => 'entry', :action => 'collections_atom' end