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.

custom redirect to an https://

Discussion in 'General Discussion' started by imediadirect, Feb 1, 2006.

  1. imediadirect

    imediadirect Registered

    Joined:
    Feb 1, 2006
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    I have an SSL cert installed on my site. www.domain.com always defaults to an http://www.domain.com instead of the secure site https://. I know I need to set up a custom redirect to the https:// but don't know how to set this up.

    Anyone have any knowledge on this, whether this can be done in cpanel or through HTML code in the index.htm file?
     
  2. dalem

    dalem Well-Known Member
    PartnerNOC

    Joined:
    Oct 24, 2003
    Messages:
    2,577
    Likes Received:
    40
    Trophy Points:
    48
    Location:
    SLC
    cPanel Access Level:
    DataCenter Provider
    put the code below in your .htaccess




    Options +SymLinksIfOwnerMatch
    RewriteEngine On
    RewriteCond %{SERVER_PORT} !=443
    RewriteRule ^ https://www.domain.com%{REQUEST_URI} [R,L]
     
  3. imediadirect

    imediadirect Registered

    Joined:
    Feb 1, 2006
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    thank you!!! worked fine!
     
Loading...

Share This Page