Verilen bağlantının https ile başlayıp başlamadığını kontrol eden ve eğer http ile başlıyorsa bunu https ile değiştiren javascript kodu alternatifidir.
if (document.location.protocol != "https:") {
document.location = document.URL.replace(/^http:/i, "https:");
}