/ Published in: JavaScript
Redirect to SSL script
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
function redirectSecure() { if (document.location.protocol != “https:â€){ var oldURL = window.location.hostname + window.location.pathname+window.location.search; var newURL = “https://†+ oldURL; window.location = newURL; } } redirectSecure();