XF 2.2 Transfer Cookie Domain

I just want to move my forum from www.emuenzen.de to forum.emuenzen.de. As a first step I changed the option in the config.php from:
$config['cookie']['domain'] = '';
to
$config['cookie']['domain'] = '.emuenzen.de';

Then I logged out and tried to re-login. But it failed - I can´t login anymore.
When I change the setting again to ''; everything is fine.

What am I doing wrong?
 
The "." moves you between folders. In this case you are treating a subdomain as a folder of your main domain. So even if we call it a subdomain to simplify, but in reality it is a domain in itself. So I either add the entire domain scream or leave everything as is.
 
The documentation says :
  • $config['cookie']['domain'] = '';

Similiar to the cookie path setting, this allows you to specify a domain upon which your cookies can be read. It is unusual to need to set this value to anything other than the default, but as with the cookie path, you should be very careful if you change it, because entering a value that prevents XenForo from reading its own cookies will break important functionality, like the ability to stay logged in.


The reason for setting this value would be to allow cookies to be shared on multiple subdomains, for example a setting of .example.com would allow cookies to be accessed on all subdomains of example.com, such as www.example.com and other.example.com. In most instances, this setting can be left with its default setting.


for example a setting of .example.com would allow cookies to be accessed on all subdomains of example.com,

In my case this option does not work.

I want to store the forum cookie so that I can access it from all subdomains.
 
Back
Top Bottom