Re: Re: HTTPS w/ header() ?

From: Date: Mon, 20 Aug 2001 00:50:46 +0000
Subject: Re: Re: HTTPS w/ header() ?
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-63590@lists.php.net to get a copy of this message
I have done something like this. For the site I am working on, the user must log on. At the logon screen I check if(getenv("HTTPS")!="on") { header ("Location: https://logon_screen"); } every page has an include that checks $HTTPS as part of the sessions and validation. If https!="on" then it kicks you back to the logon screen. you could do the same using if(getenv("HTTPS")!="on") { header ("Location: https://$SERVER_NAME/$PHP_SELF"); } I think Don't know if that's what you're after, but it's what I've done and I have a high index of suspicion that it is working... Lee ----- Original Message ----- From: "Richard Lynch" <ceo@l-i-e.com> To: <php-general@lists.php.net> Sent: Sunday, August 19, 2001 12:50 PM Subject: [PHP] Re: HTTPS w/ header() ? > > Is there is a way with PHP (most probably headers) to go HTTPS mode? > > I don't want to specify > > https://www.myserver.com/secured_page.php > > I just want it normal but in it's header to tell the browser to initiate > an > > HTTPS mode. > > I don't think you can do that... > > You could send a header to do: > > header("Location: > https://www.myserver.com/secured_page.php"); > > but pretty much the user will then see the https when the page shows up... > > What's the big picture here? I've got a feeling you've gone down a wrong > path that's making you ask this question... > > -- > WARNING richard@zend.com address is an endangered species -- Use > ceo@l-i-e.com > Wanna help me out? Like Music? Buy a CD: > http://l-i-e.com/artists.htm > Volunteer a little time: http://chatmusic.com/volunteer.htm >

« previous php.general (#63590) next »