One Application, Multiple Domains.. separate data?

Hi,

I am developing a sort of CMS application that will be used by
multiple domains on my host.

Each domain requires its own set of users, news, etc., but I would
like to keep my application only installed one place on my host and
sym-link to it.

Is it possible to modify all queries to also include a 'domain' in the
where clause or something like that?

i.e. if i do a Table.find(:all) in one of my controllers, and that
controller is being accessed by domain1, can I limit the query's
results by some sort of where clause?

I dabbled with the idea of using table prefix's, but later ditched the
idea.

It seems like the appropriate solution is to add another column to my
tables that includes which domain the data is specific to and somehow
limit that in the application... any ideas?

Thanks,
jay

I guess this is possible, but I will have to look more into linking/
forwarding.

For instance, domain1.com/news/show/1 would need to tell the
application to find the news with :id of 1, but ALSO where domain=1.

Can I link so that all urls also pass along an extra set of
parameters?

-Jay