• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

XF 1.3 Cookie issue

#1
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?
 
#4
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.