Page 1 of 1

Multiple domains, same codebase

Posted: Thu Jan 22, 2009 10:35 am
by ajtacka
I've been asked to add a couple of 'local' domains to the site I'm working on now. This means that along with site.com, we now have (eg) site.es, site.cz and site.de.

All these domains will be sharing the same codebase, just displaying a different language. Ideally, if someone logs on to site.com, they will be logged on when they later go to site.de, or vice versa. Obviously I've run into problems with cross-domain cookies not being allowed (and rightly so). I've already found one solution which uses redirecting magic to basically set the cookie on both the local and .com domains. This will do the job, and I have started implementing it, but I have a nagging feeling it's not the 'right' solution.

So my question is, is there a completely different way to get around this problem? If there is a way to show the local domain to the user but internally (including for setting cookies) use the .com domain, that would be perfect. I have to admit that server admin definitely isn't my strong point, so I have no idea what's possible, easy, hard or just plain impossible.

Thanks for your help.

Re: Multiple domains, same codebase

Posted: Thu Jan 22, 2009 10:39 am
by Da_Elf
id do it where each was on the same server but stored in a different folder. all the code will be in a code folder and inside each language folder is just an index file that sets a cookie for that language or a session for that language

in other words id set them up as sub-domains rather than parked domains

Re: Multiple domains, same codebase

Posted: Thu Jan 22, 2009 10:45 am
by ajtacka
Da_Elf wrote:in other words id set them up as sub-domains rather than parked domains
I personally wouldn't do it domains either, but in this case I don't have any choice - the orders are from on high.

Re: Multiple domains, same codebase

Posted: Thu Jan 22, 2009 3:39 pm
by Stryks
I'd take a look at your host's control panel and look for a Domain Alias section. Either that or contact them about it.

Multiple domains, same codebase.

Cheers

Re: Multiple domains, same codebase

Posted: Thu Jan 22, 2009 3:55 pm
by ajtacka
Stryks wrote:I'd take a look at your host's control panel and look for a Domain Alias section. Either that or contact them about it.

Multiple domains, same codebase.

Cheers
Thanks Stryks, I think that's about what I was looking for. We have our own servers and admin - could you give me a few more specific details so I know what to ask for? Is it something in httpd.conf?

This is the area where I get a bit murky, but I need to have some idea of exactly what needs to be done. A (very) quick google search only seems to turn up answers for specific hosts using control panels.

Re: Multiple domains, same codebase

Posted: Thu Jan 22, 2009 4:01 pm
by Stryks
The following link might help you out.

Link