From d96b133bcdf630fd17c1264bb9954648983f13dc Mon Sep 17 00:00:00 2001 From: Antoine Pitrou <pitrou@free.fr> Date: Fri, 6 Sep 2002 18:06:08 +0000 Subject: [PATCH] bug IIS --- spip_cookie.php3 | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/spip_cookie.php3 b/spip_cookie.php3 index f82d9ab235..399d611075 100644 --- a/spip_cookie.php3 +++ b/spip_cookie.php3 @@ -141,7 +141,18 @@ else if ($cookie_admin AND $spip_admin != $cookie_admin) { if ($cookie_session) setcookie('spip_session', $cookie_session); -// redirection -@header("Location: " . $cible->getUrl()); +// Redirection +// Sous Apache 1.x, les cookies avec une redirection fonctionnent +// Sinon, on fait un refresh HTTP +if (ereg("^Apache", $SERVER_SOFTWARE)) { + @header("Location: " . $cible->getUrl()); +} +else { + @header("Refresh: 0; url=" . $cible->getUrl()); + echo "<html><head>"; + echo "<meta http-equiv='Refresh' content='0; url=".$cible->getUrl()."'>"; + echo "</head>\n"; + echo "<body>Si votre navigateur n'est pas redirigé, <a href='".$cible->getUrl()."'>continuer</a>.</body></html>"; +} ?> -- GitLab