views:

68

answers:

1

I have a site: www.mydomain.com where we have administrative controls hidden away from normal customer view. I would like to only access the administrative features under a subdomain such as admin.mydomain.com. I can ensure that any requests to an administrative feature has to have admin in the subdomain, but how can I make sure that if the admin clicks anything else on the site such as a link to "mydomain.com/about_company" that they would get off of the admin host domain, and gets set back to the regular www.mydomain.com?

From my understanding of rails routing, a subdomain can be directed to a controller, but my administrative features are split into multiple controllers. Any ideas?

Thanks!

+1  A: 

You can use subdomain_fu http://github.com/mbleigh/subdomain-fu for this matter.

webnuwan
+1 for subdomain-fu
Mike