I have one RoR install and I am trying to use it for multiple websites. I want to use one RoR install because all the websites are similar (need to share same models) and need to be managed by the one admin namespace. My basic file structure is something like:
app
..controllers
....admin_namespace
....website1_namespace
....website2_namespace
..models
....admin_namespace
....website1_namespace
....website2_namespace
..views
....admin_namespace
....website1_namespace
....website2_namespace
Does anyone know how I could point domain names to separate namespaces and remove the namespace from the url? I.e.
www.admin.com -> points to /admin_namespace route
www.website1.com -> points to /website1_namespace route
www.website2.com -> points to /website2_namespace route
Using something like PHP, normally you would use Virtual Hosts to point different server names to different folder locations, but the problem I am running into is that you have to point all websites to app_name/app/public.