Apparent cookie issue when switching between blogs
-
I have been blogging for some time running a wordpress blog from my domain: eg. https://www.mydomain.com (runs from /wwwroot)
Within the wp-options database:
The siteurl value is https://www.mydomain.com/
The home value is https://www.mydomain.comRecently I setup a seperate copy of wordpress at subdomain.mydomain.com (runs from /wwwroot/subdomain.mydomain.com)
Within the wp-options database:
The siteurl value is https://subdomain.mydomain.com/
The home value is https://sudbomain.mydomain.comBoth have independent MySQL databases, data stores, user accounts etc. I generated sepereate keys for the second blogs wp-config file.
The problem I’m having is that when a user browsers to the www site and then switches to the subdomain site, they can no longer return to the www site. When they try the URL will change in their browser and the content will refresh but it will continue displaying the subdomain content.
Alternatively if they visit the subdomain site first, they can’t then browse to the www, again the URL changes, the page reloads but the subdomain content remains displayed.
To try and diagnose the issue I grabbed tamper data (firefox extension) and captured the session information. It looks like that regardless of which site I visit first, only one cookie gets created. When switching back and forth, the same cookie is refrenced. Forcing a refresh and clearing the cookie corrects the problem.
To drive the point home, I loaded up IE and flicked it into in private browsing. Here I can flick back and fort between the blogs as much as I like.
So:
Question 1: I didn’t think WordPress was meant to use cookies except for authenticated users?
Question 2: Any ideas on how to fix this problem?
- The topic ‘Apparent cookie issue when switching between blogs’ is closed to new replies.