On 03 Mar 2009, at 01:02, Frederick Cheung wrote: >> All run the same rails application, but every user have their own >> subdomain (i can't use a third level like first.maindomain.com >> because >> it would be a chaos having other subdomains), and they can have an >> own >> domain to point to their subdomain. >> The wildcard in this case will point to the application, but how tell >> apache and the rails app that the domain requested is for a given >> subdomain? Does peter's approach work for external domains too? >> (obviously the vhost would be both *.users.maindomain.com and * to >> chatch all external requests and redirect to the right subdomain) >> > > I imagine that would work fine. the existing plugins are probably > tailored to just checking the subdomain but the principle is the same
What Frederick said. If you read the account_location code, you'll see it's so easy you could easily implement it yourself. All it does is split out the full request domain and put it in easy accessors. However, I'm really wondering if working with domain names like http// frederick.fredericks-long-company-name.my-nifty-new- webapplication.com/ is a good way to go or a really bad one. 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 [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---

