LiteSpeed Redirect Traffic To HTTPS with CyberPanel

LiteSpeed Redirect Traffic To HTTPS

To redirect traffic from http to https, you can use rules that are the same as you would use in that of apache. So, for example, the below rules will help in https redirection

RewriteCond %{HTTPS} !on
RewriteCond %{HTTP:X-Forwarded-Proto} !https
RewriteRule ^(.*)$ https://%{SERVER_NAME}%{REQUEST_URI} [R,L]

If you are using CyberPanel, then you can edit the rules by going to your individual web panel for your domain, and clicking Rewrite Rules as shown below.

CyberPanel Rewrite Rules

After clicking it, I suggest you put the rule at the top of the file so that the redirection is processed before any other rule.CyberPanel Rewrite Rules FileAfter which, you just have to save the new rules and your good to go.CyberPanel Rewrite Rules Save

 

Enjoyed the content ? Share it with your friends !

PHP Request Timeout Error

PHP Request Timeout Error

Request Timeout

This request takes too long to process, it is timed out by the server. If it should not be timed out, please contact administrator of this web site to increase ‘Connection Timeout’.

If you got an error like the one shown above, and your host is using LiteSpeed as its server, then chances are you have gotten the same error as me. To solve it, edit your .htaccess in the root folder of your site with the following

RewriteEngine On
RewriteRule .* - [E=noabort:1]
RewriteRule .* - [E=noconntimeout:1]

 

Enjoyed the content ? Share it with your friends !