Skip to content

Instantly share code, notes, and snippets.

@calweb
Created April 20, 2011 17:00
Show Gist options
  • Save calweb/931928 to your computer and use it in GitHub Desktop.
Save calweb/931928 to your computer and use it in GitHub Desktop.
simply include on page you want to enforce ssl
<%
If Request.ServerVariables("SERVER_PORT")=80 Then
Dim strForceSSL
strForceSSL = "https://"
strForceSSL = strForceSSL & Request.ServerVariables("SERVER_NAME")
strForceSSL = strForceSSL & Request.ServerVariables("URL")
Response.Redirect strForceSSL
End If
%>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment