https跳转

因为PHP和Apache的mod_rewrite跳转设置后都提示无限重定向循环,就用了Javascript来做这件事:

放在body标签里会在加载页面时立即执行

比如点击http://hiiht.com,就会直接重定向至相应的https页面,如果想https跳转http,targetProtocol的值改成http即可。

Leave a Reply

Your email address will not be published. Required fields are marked *