Re: Location header does not work?

From: Date: Thu, 05 Aug 2004 03:27:47 +0000
Subject: Re: Location header does not work?
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-192796@lists.php.net to get a copy of this message
On Thursday 05 August 2004 06:18, Justin Patrin wrote: > if($_SERVER['HTTPS'] != 'on') { Careful, IIRC the value of $_SERVER['HTTPS'] differs depending on websever. The original isset() is the better way. Bing, IIRC you're redirecting back to the same page weren't you? > if ($option == 'content' and $task == 'view' and $id == 159 and $Itemid == > 162) > { > session_write_close(); > > if (!isset($_SERVER['HTTPS'])) > { > header("Location: > > https://computing.eng.iastate.edu/mambo/index.php?option=content&task=view& >id=159&Itemid=162"); } else { > echo 'hello my friend'; > } Your logic states if not in HTTPS redirect to HTTPS, otherwise (if in HTTPS) echo. -- Jason Wong -> Gremlins Associates -> www.gremlins.biz Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * ------------------------------------------ Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general ------------------------------------------ /* Living in LA is like not having a date on Saturday night. -- Candice Bergen */

« previous php.general (#192796) next »