Re: Redirect to HTTPS

From: Date: Fri, 01 Aug 2003 09:20:08 +0000
Subject: Re: Redirect to HTTPS
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-157910@lists.php.net to get a copy of this message
It might also be worth making sure that your web server is configured to force https on this page if this is what you want. Otherwise a user could type the URL in without the HTTPS and still get the page. On Friday 01 Aug 2003 9:20 am, desa15@necso.es wrote: > I have a stupid question. > > I need if i be in a http make a redirect to https. > Http is a 80 port and ssl is a 443 port > > if ($HTTP_SERVER_VARS['SERVER_PORT']==80) > { > > header("Location: https://mynet.com/pay.php"); > exit; > } > > Is the correct way to do this ??? Exist any function to make this ??? > > > > Excuse my broken English, Regards from Spain > > Un saludo, Danny

« previous php.general (#157910) next »