Topic: Sub-domains and logins

I have a private forum at http://www.celestialknights.org.uk, which is also accessible from http://celestialknights.org.uk

I've just noticed a problem - if someone posts a link to a forum post using the www sub-domain, then someone browsing at http://celestialknights.org.uk has to login if they follow the link.

Is there any way to make the login work on the main domain and the sub-domain? If not, is it possible to make Apache redirect all requests to http://celestialknights.org.uk to http://www.celestialknights.org.uk?

Russ

2 (edited by IdleFire 2005-10-18 03:55)

Re: Sub-domains and logins

Not really a PunBB problem, more a case of two domains not really being compatable together. Ausphreak has a similar situation (ausphreak.com and networkpunk.com), but if users log in separately to each one, then they'll stay logged in (unless of course they choose not to). Of course, the cookies don't match up, as the domains are different.

Hypothetically, you could set up a redirect that took all traffic from http://celestialknights.org.uk to http://www.celestialknights.org.uk, but I think that as long as you don't dwell on the straight http://[domain] one, people will stop using it soon enough.

Re: Sub-domains and logins

This is a punbb misconfiguration if I'm not mistaken.

Go to your config.php and set

$cookie_domain = 'http://celestialknights.org.uk';

That should fix it...

I don't HAVE a signature, ok?

Re: Sub-domains and logins

But then, www.celestialknights.org.uk wouldn't work with the cookies tongue

Prioritise which one's more important (and if you have cPanel installed, just redirect all traffic from one to the other).

Re: Sub-domains and logins

Actually, try this
$cookie_domain = '.celestialknights.org.uk';

Re: Sub-domains and logins

Smartys wrote:

Actually, try this
$cookie_domain = '.celestialknights.org.uk';

I've just tried that, and it seems to be working fine.

Many thanks smile

Russ

Re: Sub-domains and logins

If got a similar problem,

I run my forum on forum.domain.com and i have build a login on www.domain.com

If i set $cookie_domain to '' (wich is standard) i can not log in on de www site, if i change the $cookie_domain to '.domain.com' i can't log off on the forum domain on the www domain it works.

But if i log in on the www domain and i go tot the forum domain then i can't log off there, if i try then i get the redirect "you're logged off" but when i return to the index i'm still logged in.

Who can help me

Re: Sub-domains and logins

Something is odd then, as .domain.com should work
What's the site?

Re: Sub-domains and logins

Clear your cookies, then try with .domain.com

"Programming is like sex: one mistake and you have to support it for the rest of your life."

Re: Sub-domains and logins

Rickard wrote:

Clear your cookies, then try with .domain.com

If it helps, I wrote a web page to help my users clear their cookies. It makes reference to the Lions Forum (my punBB install), but if you ignore that the instructions should work. It's at:
http://www.phillipsuk.org/ClearCookies.html

Russ

Re: Sub-domains and logins

After clearing my cookies, it works just fine smile

Thanks

Re: Sub-domains and logins

avantman42 wrote:

If it helps, I wrote a web page to help my users clear their cookies. It makes reference to the Lions Forum (my punBB install), but if you ignore that the instructions should work. It's at:
http://www.phillipsuk.org/ClearCookies.html

Russ

If i visit the page (with IE 6.0 sp1, win98) the page is blank, but when i view the source, it's al there :S

Re: Sub-domains and logins

I have the same with Windows XP, IE 6.0

Re: Sub-domains and logins

Joop Visstick wrote:

If i visit the page (with IE 6.0 sp1, win98) the page is blank, but when i view the source, it's al there :S

Thanks for pointing that out - I'd forgotten to close the <title> tag roll I'd checked it in Firefox, but I don't use IE, and only had access to it at work. It's fixed now.

Russ