2018年11月9日

Javascript 強制轉換至https網址


if (location.protocol != 'https:'){
location.replace( 'https:' + window.location.href.substring(window.location.protocol.length) );
}

沒有留言:

張貼留言