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!

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:
    18
    Likes Received:
    4
    Trophy Points:
    3
    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,888
    Likes Received:
    90
    Trophy Points:
    78
    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.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. Brooky A

    Brooky A Member

    Joined:
    Sep 16, 2015
    Messages:
    18
    Likes Received:
    4
    Trophy Points:
    3
    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 Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    45,442
    Likes Received:
    1,961
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello :)

    Do you have any .htaccess files outside of the account's public_html directory?

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. Brooky A

    Brooky A Member

    Joined:
    Sep 16, 2015
    Messages:
    18
    Likes Received:
    4
    Trophy Points:
    3
    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:
    18
    Likes Received:
    4
    Trophy Points:
    3
    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 Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    45,442
    Likes Received:
    1,961
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Can you reproduce the issue if you create a new subdirectory under the public_html directory with a simple HTML file?

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
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