Return to Snippet

Revision: 43848
at April 1, 2011 03:04 by timpreneur


Initial Code
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();

Initial URL

                                

Initial Description
Redirect to SSL script

Initial Title
Javascript redirect to SSL

Initial Tags

                                

Initial Language
JavaScript