方法很简单,直接在你的HTML文件或模板文件,例如:footer或header文件中,在<head>标签中加入里插入使用JavaScript代码,即可使其强制http到https。
<script type="text/javascript">
var targetProtocol = "https:";
if (window.location.protocol != targetProtocol)
window.location.href = targetProtocol +
window.location.href.substring(window.location.protocol.length);
</script>


