1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice
  2. Dear Pleskians, please read this carefully! New attachments and other rules Thank you!
    Dismiss Notice
  3. Dear Pleskians, I really hope that you will share your opinion in this Special topic for chatter about Plesk in the Clouds. Thank you!
    Dismiss Notice

Default to https connection?

Discussion in 'Plesk 10.x for Windows Issues, Fixes, How-To' started by JacksonY, Jul 6, 2011.

  1. JacksonY

    JacksonY Basic Pleskian

    17
    85%
    Joined:
    Aug 17, 2010
    Messages:
    47
    Likes Received:
    0
  2. JacksonY

    JacksonY Basic Pleskian

    17
    85%
    Joined:
    Aug 17, 2010
    Messages:
    47
    Likes Received:
    0
    Any advise?
     
  3. AndorA

    AndorA Basic Pleskian

    21
    57%
    Joined:
    Nov 30, 2009
    Messages:
    58
    Likes Received:
    0
    I don't think you can make SSL required for a specific folder directly with a Plesk setting.

    I would do it using a script, so anybody trying to load the page as http would be redirected automatically.

    It would look something like this in ColdFusion, but in PHP or whatever is your scripting language of choice you should be able to do the same thing:

    <cfif left("#CGI.server_protocol#",5) NOT IS "https">
    <cflocation url="https://www.myserver.com#CGI.path_name#" />
    </cfif>

    Basically, check what protocol is used. If it's not https, then redirect to the same page but loading through SSL.

    Regs,
    Andor
     
Loading...