兼容:
<!-- 如果检测到是http页面,则自动跳转到对应的https页面 --> <script type="text/javascript"> if (document.location.protocol != "https:") { location.href = location.href.replace(/^http:/,"https:"); } </script>
ASP:
<% If Request.ServerVariables("SERVER_PORT")=80 Then Dim strSecureURL strSecureURL = "https://" strSecureURL = strSecureURL & Request.ServerVariables("SERVER_NAME") strSecureURL = strSecureURL & Request.ServerVariables("URL") Response.Redirect strSecureURL End If %>
PHP:
if(!isset($_SERVER['HTTPS'])||!$_SERVER['HTTPS']){ $url ='https://'. $_SERVER['HTTP_HOST']. $_SERVER['REQUEST_URI']; header('Location: '. $url);exit; }
第一商务旗下企业服务引擎ePower是CNNIC&ICANN认证工信部批准顶级域名注册,域名查询,商标注册,虚拟主机,邮局托管服务商。
Powered by ePower 1.13.5 © 2017-2022 ePower 版权所有,并保留所有权利。
统计代码