XF 1.3 Cookie issue

RustyDogma

Member
My site can be accessed with or without www prefix, but it doesn't share cookies between the two so you can be logged into one and not the other. Which can be annoying when both formats are used in links. How do I fix this within Xenforo?
 
It's detailed in the Frequently Asked Questions thread.

Thanks ! I saw the FAQ, but I was wondering if it could be done like this:

Code:
if ($_SERVER['HTTP_HOST'] == 'www.mysite.ws') {
$config['cookie'] = array(
'prefix' => 'new_',
'path' => '/',
'domain' => '.mysite.ws'
);
}

if ($_SERVER['HTTP_HOST'] == 'mysite.ws') {
$config['cookie'] = array(
'prefix' => 'new_',
'path' => '/',
'domain' => 'mysite.ws'
);
}

But is it better to do it in .htaccess? I want to force a cookie reset at the same time, but was actually hoping to be able to use both www and non-www - but perhaps that cannot work.
 
Back
Top Bottom