how to use SSL with asp/vbscript

Discussion in 'ASP General' started by Dean g, Mar 23, 2005.

  1. Dean g

    Dean g Guest

    I'm complety new to ssl so this is a total newbie question, the isp i'm
    using has authorized ssl on my site but i dont know how to tell a
    particular page that it can only be run as a secure page... Where at the
    moment u can view the page as https or http.
    I'm assuming i need some code to detect whether its being run as a https
    and if not redirect it to https.

    surprisingly i couldnt find much info about this online so any
    assistance would be appreciated.
    Dean
     
    Dean g, Mar 23, 2005
    #1
    1. Advertisements

  2. Dean g

    Adam Short Guest

    You can embed a check in your ASP code. Put it at the top!

    <%
    if UCase(Request.ServerVariables("HTTPS")) = "OFF" then response.redirect
    "https://www.yourdomain.com/yourpage.asp"
    %>

    Hope this helps.

    Adam
     
    Adam Short, Mar 23, 2005
    #2
    1. Advertisements

  3. Dean g

    Dean g Guest

    Thanks adam thats exactly what i need.
    i appreciate the help
    Dean
    ----------------------------------------------------------------------
    From: Adam Short

    You can embed a check in your ASP code. Put it at the top!

    <%
    if UCase(Request.ServerVariables("HTTPS")) = "OFF" then
    response.redirect
    "https://www.yourdomain.com/yourpage.asp"
    %>

    Hope this helps.

    Adam
     
    Dean g, Mar 23, 2005
    #3
  4. Gazing into my crystal ball I observed
    Do you realize you're replying to a post from 2005? I guess better late
    than never!
     
    Adrienne Boswell, Oct 1, 2009
    #4
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.