#EANF#
I'm trying to get rid of a certificate warning. I have the following code
that executes before anything else, and forces the user to the https
version of the URL:
if((!isset($_SERVER['HTTPS']) || $_SERVER['HTTPS'] == "") &&
($_SERVER['REMOTE_ADDR'] != '127.0.0.1')){
$redirect = "https://".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];
header("Location: $redirect");
exit();
}
This redirects to the correct URL, but it seems to leave an SSL warning in
its wake:
In the console I get this:
(The page at https://mysite.com/special-offer/ displayed insecure content
from http://mysite.com/special-offer/.)
However if I visit the url ($redirect) directly, no SSL warning is given.
All resources are being served over https.
No comments:
Post a Comment