Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

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:
    151
    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,772
    Likes Received:
    93
    Trophy Points:
    353
    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]
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. imediadirect

    imediadirect Registered

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

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice