Litespeed and the new cPanel force https redirect

#1
We are using cPanel cloudlinux with litespeed webserver for our shared hosting. Since version 80 of cPanel there is a nice force https redirect option in the customers cPanel interface. It works on the vhost level of apache so that no htaccess code is needed to redirect to https.

Now the problem, it does not work on litepeed. Switching back to apache then it works and a domain is nicely redirected to https. So the question is, how to make it work on litespeed? Can i do tha myself or does the litespeed team needs to develop something for this?
 

Pong

Administrator
Staff member
#4
Thanks for reaching out. I just run some test in our lab server and LiteSpeed run well with https force redirect. I don't see any problem.

Basically, whm/cpanel will write rewrite rules to the virtual host configuration:
<IfModule rewrite_module>
RewriteEngine On
RewriteCond %{REQUEST_URI} ^/\.well-known/(pki-validation|cpanel-dcv)/
RewriteRule ^ - [END]

RewriteCond %{HTTPS} !=on
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
</IfModule>
LiteSpeed and Apache should behave the same.
 
Top