所以記來以後來會用到
$(function () {
if (window.location.protocol != "https:") {
var sslUrl = location.href.replace(/^http/i, "https");
window.location.href = sslUrl;
return;
}
});
參考網站Detect HTTP or HTTPS then force HTTPS in JavaScript