Domain (not subdomain) routing

I have several websites that are all basically the same thing but with
a different layout and a different primary controller

Everything else is the same, DB, graphics, other views, etc…

So I though …

  • have 1 rails app
  • have a virtual host in apache for each virtual app
  • route requests for each domain to the same mongrel
  • have rails route based on DOMAIN

Any idea how to do this. I’ll check out the source to the
request_routing plugin.

Yes, you want the request routing plugin and the theme_support plugin.


Building an e-commerce site with Rails?
http://www.agilewebdevelopment.com/rails-ecommerce