Subdomain Setup

Hi all,

I’m implementing a new site that will need domains like this:
newyork.foo.com, chicago.foo.com. Each of these domains will be a self
contained community. Locations is a table in the db. The user will be
able
to login to a specific Location and then add content to it. When a user
visits newyork.foo.com for example, I need to scope all the content to
that
specific location. new locations do not need to be created dynamically.
Can anyone recommend a good way of setting up this type of environment?
I’m
using Apache 2.2

thanks!

Hello - try
http://wiki.rubyonrails.com/rails/pages/HowToUseSubdomainsAsAccountKeys

This
http://redhanded.hobix.com/bits/dynamicVhostsOneLinerForRails.html may
help you.

Those are helpful links, thanks. But where my problem differs is that
the
subdomain is not user specifc, rather it is group specific. An Account
belongs to a city and a city name is what is used for the subdomain.

It’s the same principal. Just get the subdomain use it to find the
appropriate city, group, cow, spaceship, whatever…

Starr

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs