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.

SSL Redirect outside of mod_rewrite (.htaccess)!?

Discussion in 'Security' started by Brooky A, Sep 16, 2015.

  1. Brooky A

    Brooky A Member

    Joined:
    Sep 16, 2015
    Messages:
    8
    Likes Received:
    1
    Trophy Points:
    1
    Location:
    UK
    cPanel Access Level:
    Root Administrator
    Hi All,

    I hope I can pick your brains as I'm losing my mind. I've been trying to write some .htaccess code to STOP https redirects for a specific path. The whole site is under SSL which I thought was being controlled by mod_rewrite but its important one URL isn't.

    After hours I removed the .htaccess file (in the root of the public_html folder) all together. To my surprise it STILL redirected to https!?

    Does anyone know of anywhere else I can look in WHM or server as a whole to see whats causing the forced SSL?
     
  2. 24x7server

    24x7server Well-Known Member

    Joined:
    Apr 17, 2013
    Messages:
    1,146
    Likes Received:
    34
    Trophy Points:
    48
    Location:
    India
    cPanel Access Level:
    Root Administrator
    Hello,

    Are you using any CMS scripts for your site? Try to check our site databases for that redirection. If you are using word-press, then you need to check your sites links your wordpress databases.
     
  3. Brooky A

    Brooky A Member

    Joined:
    Sep 16, 2015
    Messages:
    8
    Likes Received:
    1
    Trophy Points:
    1
    Location:
    UK
    cPanel Access Level:
    Root Administrator
    Thanks for your reply. It's all bespoke Laravel stuff. I've downloaded and searched the code for redirects.

    I wonder if the browser can cache redirects? They are all permanent 301 redirects.
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    654
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
  5. Brooky A

    Brooky A Member

    Joined:
    Sep 16, 2015
    Messages:
    8
    Likes Received:
    1
    Trophy Points:
    1
    Location:
    UK
    cPanel Access Level:
    Root Administrator
    Thanks for the reply. There is only one .htaccess file in the public_html folder.
     
  6. Brooky A

    Brooky A Member

    Joined:
    Sep 16, 2015
    Messages:
    8
    Likes Received:
    1
    Trophy Points:
    1
    Location:
    UK
    cPanel Access Level:
    Root Administrator
    I completely emptied the public_html folder and only put an index.html file. The domain will still only load under SSL!

    Is there anywhere I can look in the vhosts config for SSL to be forced?
     
  7. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    654
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Can you reproduce the issue if you create a new subdirectory under the public_html directory with a simple HTML file?

    Thank you.
     
Loading...

Share This Page