Logout, cookie not set problem – SOLVED
-
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 -> Serverhope you’ll find the fix useful.
- The topic ‘Logout, cookie not set problem – SOLVED’ is closed to new replies.