Routing wierdness

perhaps i am missing something but i can’t seem to see it so perhaps
someone else can see what is going on

i have the following routes setup

map.connect “”, :controller => “main”, :action => “index”, :site =>
“home”
map.connect “admin”, :controller => “admin/main”, :action => “index”
map.connect “:site”, :controller => “main”, :action => “index”
map.connect “:controller/:action/:id”

however, the 2nd route never matches, but the 3rd one does.

in other words, if someone attempts to go to

mysite.myhost.com/admin, i want them routed to admin/main controller,
index action

if someone goes to

mysite.myhost.com/anythingelse, route them to main controller, index
action

but for some reason

mysite.myhost.com/admin IS NOTmatched against the 2nd route but IS
matched against the 3rd route.

am i missing something here?

Chris

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs