RE: [PHP] http to https

From: Date: Fri, 18 Jun 2004 00:18:29 +0000
Subject: RE: [PHP] http to https
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-188519@lists.php.net to get a copy of this message
Quick follow up... Has anyone had any issues with redirecting from an http script to https? Every time I try to to a redirect to https it hangs. For example, I write a simple script like this, nothing... <?php header ('Location https://www.tgwedding.com/payment6.php'); ?> ...but if I type that link in a browser http is working fine. -----Original Message----- From: Andre Dubuc [mailto:aajdubuc@webhart.net] Sent: Thursday, June 17, 2004 8:01 PM To: Ryan Schefke; ryan@triomfgroup.com Subject: Re: [PHP] http to https Hi Ryan, I encountered all sorts of problems attempting to do the same (especially with AOL, Yahoo, etc click-throughs). I finally resolved the problem by calling https on the page itself (which is listed then as http) like so at the top (after my session_start(); of course: <?php if ($_SERVER['HTTPS'] != "on"){ header("Location: https://www.your_site.com.php"); exit;} ?> Hth, Andre On Thursday 17 June 2004 07:27 pm, Ryan Schefke wrote: > I'm getting some strange behavior when trying to go from http to an https > script. > > > > After clicking a form submit button the script will execute the two lines > below. It does this and sends it to the correct page without the https, > only http. What is strange is when I go back on my browswer and resubmit, > it correctly sends it to the https location and all is well. > > > > $redirect = "https://www.tgwedding.com/payment6.php"; > > header ("Location: $redirect"); > > > > > > What am I doing wrong?

« previous php.general (#188519) next »