This topic is locked

Force SSL connections

10/14/2011 5:03:45 PM
PHPRunner General questions
C
ckranich authorDevClub member

Hello all,
For me, the following inserted at the top of dbcommon.php worked fine:



function secure_page()

{

if ( !isset($_SERVER['HTTPS']) || strtolower($_SERVER['HTTPS']) !== 'on' )

{

header ('Location: https://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI';]);

exit();

}

}

secure_page();


Kind Regards,
ckranich
I was forced to open new topic because the original topic

http://www.asprunner.com/forums/topic/6797-httpsssl-how-to/

was locked

(maybee the admin may append this to the original topic....)