Two subdomains with diferent controllers but same helpers an

Hi,

I want to have www.myproduct.com and myclient1.myproduct.com working on
same
server.

I would like to have different controller in wich subdomains, example:
on www I want to have sgnup and prices controller and on myclient
subdomain I
want login, settings, etc…

I can open two environments
rails www
rails clients

or point the two subdomains to same environment
rails myproduct

Wich is the best choice. Is there any way to share the helpers and
components
between the www and the clients environments?

If I choose the second way, is there a way to define controllers by
subdomain?

Thanks for all


Atenciosamente,

Rafael L.
[email protected]

Esta mensagem pode conter informações confidenciais, caso você não seja o real
destinatário, apague-a de sua caixa postal. A reprodução ou utilização do
material contido nesta mensagem não é permitida sem prévia autorização do
autor. Agradeço a compreensão.

Rafael L. wrote:

rails www
Thanks for all

I’ve had to work on this in a similar environment, I had one https url
and one regular http url. What I did is for those controllers that
/must/ be on the secure site I have a before_filter that checks the
domain, and if it’s not right it re-directs them. Only in production
though, in dev it just writes a note to the log that you should be
re-directed.

–James