The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

only secure "https://" possible?

Discussion in 'General Discussion' started by basic, Apr 22, 2009.

  1. basic

    basic Active Member

    Joined:
    Nov 10, 2004
    Messages:
    41
    Likes Received:
    0
    Trophy Points:
    6
    Hello All:

    A simple question:
    Is it possible (in WHM) to set a domain hosting account up, so that it is ONLY accessible via https://.... and not http://... Someone trying to access http://domain.com would then be forwarded to https://domain.com -- is that possible, can this be set up? If so, how?

    Thanks for your input.


    John
     
  2. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    You could set up a redirect rule to direct traffic going to http:// to go to https://. This can be done by using mod_rewrite directives in .htaccess. You can find information on how to do this at:

    http://httpd.apache.org/docs/2.0/mod/mod_rewrite.html
     
  3. basic

    basic Active Member

    Joined:
    Nov 10, 2004
    Messages:
    41
    Likes Received:
    0
    Trophy Points:
    6
    Thanks!

    To anyone else interested -- this works:

    I edited the .htaccess file of the domain and added these three lines:

    RewriteEngine On
    RewriteCond %{HTTPS} off
    RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
     
  4. PlatinumServerM

    PlatinumServerM Well-Known Member
    PartnerNOC

    Joined:
    Jul 10, 2005
    Messages:
    397
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    New Jersey, USA
    cPanel Access Level:
    Root Administrator
Loading...

Share This Page