Hi,
I’ve found a lot of questions and answers on this forum and google surrounding implementing cookies across multiple subdomains. Currently I am setting:
'domain'=>'.mydomain.com'
so that cookies will work across all domains. However, I have two Yii sites running on the same server one running on a subdomain of the main, a testing site and the main site. Cookies from the main site are able to interfere with the test site. My usecase is that I have a main site a mydomain.com and a test site at test.mydomain.com. Currently my cookieParams are set to:
'domain'=>'.mydomain.com'
And
'domain'=>'test.mydomain.com'
How can I stop cookies migrating from the main site to the test site? I want to be able to have the equivalent of ‘notDomain’=>‘test.mydomain.com’.
Any ideas?
Thanks
Andrew