프로그래밍/ASP

asp https redirect

p-a-r-k 2017. 3. 15. 14:54
반응형

http접속시 https redirect


<%
	nowprotocol = Request.ServerVariables("HTTPS")
   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
%>
반응형