整站http强制跳转至https解决方法
发布时间:2022/1/4
用写字板或者记事本编辑打开,在标签中间加上如下代码:
1 2 3 4 5 | <script type= "text/javascript" > var url=window.location.href; url=url.replace( "http:" , "https:" ) window.location.replace(url); </script> |
这样就能实现访问http的时候自动跳转到https了