troubleshooting Question

redirect to https. How to make it always work

Avatar of bob_mechler
bob_mechlerFlag for United States of America asked on
Web BrowsersInternet Protocols
4 Comments1 Solution694 ViewsLast Modified:
The following code ( we thought) would always redirect to https. We found that in the user typed in the URL and included the default.htm, it would not fire. because the code below was in the default document called default.asp

How do I change this and/or how do I put this code into default.htm which is really the start of the website.

<html>
<head>
<title></title>
<%
  Dim bSSLOn
  Dim sURL

  bSSLOn = (Request.ServerVariables("HTTPS") = "off")
  if bSSLOn then


    sURL = "https://sampleweb.com/virtualdir/default.htm"
    Response.Redirect (sURL )

  end if
%>


</head>
<body>
</body>
</html>
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 4 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 4 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros