Jump to content

http redirect https hk.


mbuyukoglu

Recommended Posts

Merhaba,

Proje içerisinde SSL aktif edildiğinde http üzerinden gelen istekleri aşağıdaki kod örnekleri ile https tarafına yönlendirmeye çalıştığımızda 

Bu sayfa çalışmıyor

192.168.0.222 hiç veri göndermedi.

ERR_EMPTY_RESPONSE

şeklinde hata dönüyor. unigui versiyon 1.90.0.1513

 

ServerModule-> CustomMeta

<script language="JavaScript">
function redirectHttpToHttps()
{
    var loc = window.location.href+'';
    if (loc.indexOf('http://')==0){
      window.location.href = loc.replace('http://','https://');
    }
}
redirectHttpToHttps();
</script>

 

veya 

 

loginForm-> Script

 

if (window.location.protocol === 'http:') {
    window.location.href = 'https:' + window.location.href.slice(5);
};

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...