ntka adlı üyeden alıntı

şöyle bişey var xxx.com https kullanmıyorsa bu sefer çalışmayacaktır link veya resim o sitede kullanıyorsa https

böyle bişey işinizi görür http yi tespit edip https ye yönlendiriyor.
https://stackoverflow.com/questions/4723213/detect-http-or-https-then-force-https-in-javascript


eyw hocam tamamdır :) <script>
function showProtocall() {
if (window.location.protocol != "https") {
window.location = "https://" + window.location.href.substring(window.location.protocol.length, window.location.href.length);
window.location.reload();
}
}
showProtocall();
</script> bu cevabı vermış orda biri bunu ekledim ve duzeldı :)