On 16 Feb 2010, at 18:38, CiriusMex wrote:

Hello,

I'm creating a webapplication where I would like to dinamically create
and detect subdomains. Let's say my webapplication url is www.wookie.com
Here comes an exemple:
 1. Someone subscribe to the application with the name john
 2. I create a new folder in my public/users folder named john. This
folder will contain all the accounts images, files ...etc...
 3. The user can connect to his personal page using the url:
john.wookie.com

I don't have any idea how to do this with RubyOnRails. Is it possible
to automatically create and manage subdomains without having to create
them manualy on the host server?

It's called a wildcard domain and you can easily do it with RoR if you set up your DNS and Apache right. There are plugins around for extracting the subdomain, if it isn't part of the latest Rails version already. You then use that in your authentication to determine the account. With Paperclip or attachment_fu, you can handle the uploads and store them in the structure you have in mind.


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.

Reply via email to