note 52828 deleted from function.header by tularis

From: Date: Sat, 14 May 2005 16:35:52 +0000
Subject: note 52828 deleted from function.header by tularis
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-89431@lists.php.net to get a copy of this message
Note Submitter: stefano at volimte dot it Reason: useless ---- I found this simple way to switch from http in https if ($_SERVER['SERVER_PORT']==80) { $newurl='https://'.$_SERVER['HTTP_HOST'] .$_SERVER['REQUEST_URI']; header("Location: $newurl"); } if ($_SERVER['SERVER_PORT']==443) { $newurl='http://'.$_SERVER['HTTP_HOST'] .$_SERVER['REQUEST_URI']; header("Location: $newurl"); }

« previous php.notes (#89431) next »