# Routes for common site area

**URL:** <https://www.ruby-forum.com/t/routes-for-common-site-area/176611>\
**Category:** Rails\
**Created:** [October 3, 2009, 2:41am UTC](https://www.ruby-forum.com/t/routes-for-common-site-area/176611 "2009-10-03T02:41:56Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jason](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/dc4da7/32.png) [@jason](https://www.ruby-forum.com/u/jason)\
**Post date:** [October 3, 2009, 2:41am UTC](https://www.ruby-forum.com/t/routes-for-common-site-area/176611/1 "2009-10-03T02:41:56Z")

</div>

I have the following basic routes but I think they are competing.

map.connect ‘purecontent/:controller/:action/:id’  
map.connect ‘secure/:action/:id’, :controller =\> “secure”  
map.connect ‘:action/:id’, :controller =\> “site”  
map.connect ‘:controller/:action/:id’  
map.connect ‘:controller/:action/:id.:format’

The bottom two are by default.

I added the first to create a landing page for a namespaces Admin  
controllers, which I simply access at: /pureconent/

The second is for a controller to a user section accessed at: /secure/  
It is a standard controller, with only simple actions: index, login,  
logout.

The third is for my basic site actions to appear as: /, /staff, /  
contact, etc

So, here are my questions:  
Should my first route simply be a map.purecontent “/  
purecontent/”, :controller =\> …?

I think my second and third routes are competing, as I access /secure  
and it seems to go to the site controller, but /secure/ is correct.  
How can I better setup these routes?

Is there a way to force the trailing slash, i.e. secure/?

I feel the secure section should be standard. And I’d like to avoid  
map.pagename for all these pages. None of my pages have params such  
as :id, so this is a pretty basic site. Any direction would be  
appreciated.
