23 Jul 00:41
Routes dependent on subdomain
From: Hubert Łępicki <hubert.lepicki@...>
Subject: Routes dependent on subdomain
Newsgroups: gmane.comp.lang.ruby.rails
Date: 2008-07-22 22:42:05 GMT
Subject: Routes dependent on subdomain
Newsgroups: gmane.comp.lang.ruby.rails
Date: 2008-07-22 22:42:05 GMT
Hi, I'm having little problem getting my idea to work, would be very thankful if you could help me. I have one Ruby on Rails application sitting on server, and multiple subdomains, pointing to the same server/app. For example: mainserver.com user1.mainserver.com user2.mainserver.com I want to have exactly the same app and exactly the same routes on all, except that I want to map root of mainserver.com to different controller than other. For example: mainserver.com => MainController user1.mainserver.com => UserController user2.mainserver.com => UserController Any ideas how can I do it using Rails routes? Or possibly URL rewrite in Apache proxy? I am also considering different approach - I will have 2 applications running, and share part of code (models, some base controllers), and map main web page to different instance than all other subdomains. Thanks and best, H.(Continue reading)
RSS Feed