force page to ssl


/ Published in: PHP
Save to your folder(s)



Copy this code and paste it in your HTML
  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


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.