• For those of you who are having problems when trying to logout, and being redirected to the admin page without the cookie values being cleared, the solution is to replace line 30 in wp-login.php : header(“Location: wp-login.php”);
    with this:
    if (strstr(php_uname(), ‘Windows’))
    header(“Refresh: 0;url=wp-login.php”);
    else
    header(“Location: wp-login.php”);
    // End of IIS fix by Toby
    which is a fix that i’ve seen elsewhere (can’t remember where exactly).
    The bug is caused not due to site path (at least, this specific bug), but due to the header Location: , which causes the web server to issue a 302, which then causes WordPress to generate a new url , but *without* the ?action=logout . i.e. the sequence is:
    WP -> wp-login.php?action=logout -> Server
    Server – > 302 -> WP
    WP – > wp-login.php -> Server

    hope you’ll find the fix useful.

Viewing 2 replies - 1 through 2 (of 2 total)
  • It does not work for me. what did I do wrong:

    I put this:

    if (strstr(php_uname(), ‘Windows’))
    header(“Refresh: 0;url=wp-login.php”);
    else
    header(“Location: wp-login.php”);

    then changed it to this:

    if (strstr(php_uname(), ‘Windows’))
    header(“Refresh: 0;url=wp-login.php”);
    else
    header(“Location: wp-login.php”);
    // End of IIS fix by Toby

    When I click on the logout button, you just don’t log out.

    help

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Logout, cookie not set problem – SOLVED’ is closed to new replies.