Quote:
Originally Posted by porn-update
No, the function is inserted in place of http (hand-written) in the code, so now everything is https, so http now no longer exists ...
before
Code:
<link rel="canonical" href="<?php echo 'http://'.$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI']; ?>" />
Now
Code:
<link rel="canonical" href="<?php echo URL_protocol().$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI']; ?>" />
|
That's good. Look at what I wrote in 2 and 3, move the logic from PHP to the server. The server should redirect traffic from
http to
https before it respond with HTML.