Re: Detecting if browser is using a HTTP or HTTPS connection to view the page

From: Date: Tue, 13 Jul 2004 20:57:41 +0000
Subject: Re: Detecting if browser is using a HTTP or HTTPS connection to view the page
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-190390@lists.php.net to get a copy of this message
The code im using to test is: if ($_SERVER["HTTPS"] == "off") { print "We are not using HTTPS"; } else { print "We are using HTTPS"; } On my windows machine it works as expected with it displaying the correct message when using https and http. When i use my linux box it constantly displays "We are using HTTPS" what means the statement is evaluating as false. When it should be true (as im currently viewing the page off a HTTP connection) Any ideas? Jamie

« previous php.general (#190390) next »