• 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.com

    Recently 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.com

    Both 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?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter cyranos

    (@cyranos)

    Anyone, this ones got me stumped.

    Moderator Jan Dembowski

    (@jdembowski)

    Forum Moderator and Brute Squad

    Subdomain and www, are they on the same IP? Meaning, virtual host?

    Thread Starter cyranos

    (@cyranos)

    It’s through a web hosting provider in a shared hosting environment. Both sites exist within the same app pool on the server (IIS 7 running FastCGI extensions)

    In short, yes both the www and sub-domain share an IP.

    Moderator Jan Dembowski

    (@jdembowski)

    Forum Moderator and Brute Squad

    The reason I asked is that your web server is supposed to determine which virtual host you are going to by the name it’s called.

    If you type in https://www.mydomain.com and switch back and forth to and from subdomain.mydomain.com, your web server will determine which pages to server solely by the name (assuming it’s http and not https).

    The cookies should not matter; I run multiple web vhost servers on my apache installs this way.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Apparent cookie issue when switching between blogs’ is closed to new replies.