Topic: Help with subdomains cookies
Hi there,
I have one database, two forums on two different sites and I want my forums integrated in my site. The structure looks like this:
./
./forum <- hidden directory in root
./site1.com <- actual site
./site2.com <- actual site
./forum.site1.com <- just a redirect
./forum.site2.com <- just a redirect
the two subdomains points to the ./forum directory. That means they actually use the same config.php file. In that file I give them different settings, but how do i set their cookies correctly?
The best would be if all my forums could use the same cookie, but I don't think that's possible with this structure. But at least site1.com and forum.site1.com should use the same and likewise with site2.
The settings right now looks like this:
if(site1) $cookie_domain = '.site1.com';
else if(site2) $cookie_domain = '.site2.com';
$cookie_path = '/';
And right now I can only log in on my forum.site1.com and forum.site2.com and they use different cookies.
I hope that's enough to give you an idea of what to do.