jacob v thomas
2008-Jul-03 05:24 UTC
Handling multiple domain accounts for accessing a single web app.
hi all, Here is the question, Is there a way to set multiple domain name for accessing a single rails application, below are my requirements * based on the domain i need to show pages based on their settings. * how to manage the settings at application.rb file. * the base domain url should be maintained. i am not here for discussing about subdomains. scenario : i have a site www.a.com, i have different users to my site with their own domains and settings set. for eg. 1. www.b.com and their settings B 2. www.c.com and their settings C when a user access www.b.com it should be redirected to www.a.com with the pages listed with settings B. is this possible, if so please provide a detailed reply... thanks in advance.. Regards, Jacob v thomas --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Tim Uckun
2008-Nov-02 08:12 UTC
Re: Handling multiple domain accounts for accessing a single web app.
On Thu, Jul 3, 2008 at 6:24 PM, jacob v thomas <jacobvthomas-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > hi all, > > Here is the question, Is there a way to set multiple domain name for > accessing a single rails application,Bump. Is there a way to handle multiple domains including being able to use different templates for different domains? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Peter De Berdt
2008-Nov-02 10:19 UTC
Re: Handling multiple domain accounts for accessing a single web app.
On 02 Nov 2008, at 09:12, Tim Uckun wrote:>> Here is the question, Is there a way to set multiple domain name for >> accessing a single rails application, > > > Bump. > > Is there a way to handle multiple domains including being able to use > different templates for different domains?account_location plugin, then use account_domain and use it as a key in your access management. Different templates, same functionality: either switch the stylesheet (CSS) or go un-DRY by using different view folders for each domain. Best regards Peter De Berdt --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Tim Uckun
2008-Nov-07 01:39 UTC
Re: Handling multiple domain accounts for accessing a single web app.
> > account_location plugin, then use account_domain and use it as a key in your > access management. > Different templates, same functionality: either switch the stylesheet (CSS) > or go un-DRY by using different view folders for each domain. >The account_location plugin talks about subdomains. Do you know if it''s suitable for different top level domains? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Peter De Berdt
2008-Nov-07 08:30 UTC
Re: Handling multiple domain accounts for accessing a single web app.
On 07 Nov 2008, at 02:39, Tim Uckun wrote:>> account_location plugin, then use account_domain and use it as a >> key in your >> access management. >> Different templates, same functionality: either switch the >> stylesheet (CSS) >> or go un-DRY by using different view folders for each domain. >> > > The account_location plugin talks about subdomains. Do you know if > it''s suitable for different top level domains?All it does is put some convenience methods around the built-in request.domain, request.subdomains and request.port_string methods. Sometimes it''s better to go and have a look at the actual code of the plugin to see what it does (and the code of account_domain is so simple even someone who never wrote a line of ruby would understand). account_domain will return the domain and port without the subdomain part, examples: • www.rubyonrails.org => rubyonrails.org • www.rubyonrails.org:5000 => rubyonrails.org:5000 • api.rubyonrails.org => rubyonrails.org • some.demo.app.rubyonrails.org => demo.app.rubyonrails.org If you want just the domain and nothing else (port number, …), just request.domain is what you want. Best regards Peter De Berdt --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---