Multiple domains, same codebase
Posted: Thu Jan 22, 2009 10:35 am
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.
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.