Posted By

gbot on 03/25/08


Tagged

secure ssl 443


Versions (?)

Who likes this?

4 people have marked this snippet as a favorite

gbot
Nix
withremote
AlastairDewar


force page to ssl


 / Published in: PHP
 

  1. //force redirect to secure page
  2. if($_SERVER['SERVER_PORT'] != '443')
  3. { header('Location: https://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']); exit();
  4. }

Report this snippet  

You need to login to post a comment.