Migration project from Apache to LiteSpeed Enterprise on Cloudlinux Cpanel

#1
Hello Guys,

Recently we have migrated our project from Apache to litespeed web server on cloudlinux cpanel server. Now, we are facing 500 Internal Server error issue with litespeed web server but when we switch to apache web server its works fine. But only when we use the litespeed server we face an issue with 500 Internal Server error.

Below are .htaccess Rules I use for the project Run:-

SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1
RewriteEngine On
RewriteCond %{HTTPS} off
Options FollowSymLinks
RewriteBase /
RewriteRule ^savelead/([0-9]+)$ api/web/leadbucket/savelead/$1 [R=307,L]
RewriteRule ^([0-9]+)$ api/web/domain/replaceprettylink/$1 [R=307,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /#/$1 [L]
RewriteRule ^(.*)/$ /#/$1/ [L]

<IfModule LiteSpeed>
RewriteLogLevel 9
</IfModule>

When I added this rules got 404 error.
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

So, is there any solution to fix this issue? without using apache web server.
 

Attachments

Pong

Administrator
Staff member
#2
There was a ticket associated with this. for other's interest, the rewrite rule is missing the rewrite conditoin.
Code:
RewriteCond %{REQUEST_URI} !^/#"
to avoid an infinite rewrite which leads to 500 error.
 
#3
There was a ticket associated with this. for other's interest, the rewrite rule is missing the rewrite conditoin.
Code:
RewriteCond %{REQUEST_URI} !^/#"
to avoid an infinite rewrite which leads to 500 error.
The provided rewrite rule has already been added under the .htaccess file but still getting the same error. Is there any other solution to fix this issue?
 

Pong

Administrator
Staff member
#4
"still getting the same error", no, it does not. The infinite loop issue was fixed. but your application has other rewrite issue you will need to fix.
 
Top