Skip to main content

HTTPs Issue with Apache?

Comments

9 comments

  • 24x7server
    Hello, Do you notice any specific error messages in Apache error logs file ? Can you please check it and post here so that we can assist you on this.
    0
  • Infopro
    This was resolved in ticket #7037721 as being an .htaccess issue.
    0
  • msalmanzaib
    Its not an htaccess issue as this htaccess code works fine when using Litespeed and also was working on same server before reinstall of OS with Apache.
    0
  • hostCAPO
    Hello, What are you using for NGINX? I know that apache .htaccess rules don't work with NGINX normally, though there are some reverse proxy plugins for WHM that do. Regards, Jeremy A.
    0
  • cPanelMichael
    Hello :) Could you let us know the purpose of the rewrite rule so we can offer an alternative to the rule you are currently using? Thank you.
    0
  • msalmanzaib
    Hello :) Could you let us know the purpose of the rewrite rule so we can offer an alternative to the rule you are currently using? Thank you.

    Following code is being used for www to non-www.
    RewriteEngine on RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC] RewriteRule ^(.*)$ http://%1/$1 [R=301,L]
    Code being used for http to https for all pages
    RewriteCond %{HTTPS} off RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R,L]
    Removing http to https code it works fine but for best practices i need to redirect all pages to https if not then google will double index each page. Please suggest any alternative code. Its annoying situation as everything was working with Apache before server reinstall.
    0
  • cPanelMichael
    Hello :) Check to see if some of the solutions offered on the following thread are helpful:
    0
  • msalmanzaib
    After spending alot time and using many forums different ways to fix issue. It was fixed easily by using cloudflare add page rule feature. Described here
    0
  • cPanelMichael
    I am happy to see you were able to address the issue. Thank you for updating us with the outcome.
    0

Please sign in to leave a comment.