Suggest a feature
×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: PHP
Posted by: Gábor Papp
Added: Sep 5, 2018 4:44 AM
Views: 1
Tags: no tags
  1. if ($_SERVER['HTTPS']!="on") {
  2.     $redirect= "https://".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];
  3.     header("Location:$redirect");
  4. }