duffhome
Active Member
Hello guys,
I was wondering if there's a way to force redirection to HTTPS without using .htaccess. and without having to install SSL Cert on the tracking domains?
Using PHP maybe? I found this code. where I can implement it?
Thanks
Iss.
I was wondering if there's a way to force redirection to HTTPS without using .htaccess. and without having to install SSL Cert on the tracking domains?
Using PHP maybe? I found this code. where I can implement it?
PHP:
if(empty($_SERVER['HTTPS']) || $_SERVER['HTTPS'] == "off"){
$redirect = 'https://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
header('HTTP/1.1 301 Moved Permanently');
header('Location: ' . $redirect);
exit();
}
Thanks
Iss.