note 1081 deleted from function.setcookie by sniper

From: Date: Wed, 11 Dec 2002 06:44:29 +0000
Subject: note 1081 deleted from function.setcookie by sniper
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-40696@lists.php.net to get a copy of this message
I have found that insuring that the server name in the URL must match the server canonical name in order for stuff to work most reliably. I use something like this in a strategic location before I start fiddling with cookies: if ($HTTP_HOST != $SERVER_NAME) { header("HTTP/1.0 301"); header("Location: ".METHOD."://".$SERVER_NAME.$PHP_SELF); exit; }

« previous php.notes (#40696) next »