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.

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:
    275
    Likes Received:
    31
    Trophy Points:
    28
    Location:
    New Jersey
    cPanel Access Level:
    DataCenter Provider
    There is most likely a PHP redirect happening, are you using a CMS like WordPress?
     
  3. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,762
    Likes Received:
    662
    Trophy Points:
    113
    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.
     
  4. cyberview

    cyberview Registered

    Joined:
    Oct 10, 2005
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    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