×

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
Modified: Jan 15, 2019 9:35 PM
Views: 3316
Tags: no tags
  1. if ($_SERVER['HTTPS']!="on") {
  2.     $redirect= "https://".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];
  3.     header("Location: ".$redirect);
  4. }