Results 1 to 4 of 4

Thread: [RESOLVED] [2005] Best way to switch between SSL and not?

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Nov 2001
    Location
    Mass USA
    Posts
    1,674

    Resolved [RESOLVED] [2005] Best way to switch between SSL and not?

    I would like to test on load if the current URL is SSL or not, if so redirect to SSL. What's the best approach? There are pages that will not require SSL.

    Thanks!

  2. #2
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: [2005] Best way to switch between SSL and not?

    Request.IsSecureConnection will return true or false depending on whether you're on a secure page or not. If it isn't, then you will need to redirect the user.

    Response.Redirect("https://" + theRestOfTheUrl)

  3. #3

    Thread Starter
    Frenzied Member
    Join Date
    Nov 2001
    Location
    Mass USA
    Posts
    1,674

    Re: [RESOLVED] [2005] Best way to switch between SSL and not?

    Thanks again!

  4. #4
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: [RESOLVED] [2005] Best way to switch between SSL and not?

    No problem.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width