HTTPs Issue with Apache?
Im having issue with https when using Apache all website with ssl failed to load with error like this.
- Removed -
.htaccess code.
this htaccess code works fine when using Litespeed and also was working on same server before reinstall of OS. Cpanel Ticket was also submitted with no solution # 7037721 Please suggest how to fix issue as i have to use Apache with nginx for better performance of my websites.
RewriteEngine on
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
RewriteRule ^(.*)$ http://%1/$1 [R=301,L]
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R,L]this htaccess code works fine when using Litespeed and also was working on same server before reinstall of OS. Cpanel Ticket was also submitted with no solution # 7037721 Please suggest how to fix issue as i have to use Apache with nginx for better performance of my websites.
-
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 -
This was resolved in ticket #7037721 as being an .htaccess issue. 0 -
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 -
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 -
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 -
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 pagesRewriteCond %{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 -
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.
Comments
9 comments