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!

Redirect Loop Error When Redirecting http to https

Discussion in 'Security' started by Brian Wilber, Sep 28, 2015.

  1. Brian Wilber

    Brian Wilber Registered

    Joined:
    Sep 28, 2015
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    USA
    cPanel Access Level:
    Website Owner
    I have installed an SSL certificate on my web domain and the https version of my site loads fine when I manually go to it.

    In cPanel I went to the redirects section and tried to redirect all my http traffic to https. When I try to load the website now I get an infinite loop error. I have tried modifying the .htaccess file myself based on some different posts in these forums and nothing I seem to do works. Does anyone have any other suggestions?

    Thanks.
     
  2. Jcats

    Jcats Well-Known Member

    Joined:
    May 25, 2011
    Messages:
    703
    Likes Received:
    114
    Trophy Points:
    168
    Location:
    New Jersey
    cPanel Access Level:
    DataCenter Provider
    There is most likely a PHP redirect happening, are you using a CMS like WordPress?
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    43,711
    Likes Received:
    1,791
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello :)

    Are there any other custom Mod_Rewrite rules in the .htaccess file that could be conflicting with the redirect you configured?

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  4. cyberview

    cyberview Registered

    Joined:
    Oct 10, 2005
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    151
    redirect http to https

    Code:
    redirect http to https
    .htaccess
    
    RewriteEngine On
    
    RewriteCond %{HTTPS} !on
    RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
    
     
    #4 cyberview, Nov 15, 2015
    Last edited by a moderator: Nov 15, 2015
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