Litespeed 5.3.x breaks .htaccess


Well-Known Member
I'm keeping my server on 5.2.8 due to a specific problem with one site, on all 5.3.x versions including 5.3.3.

The site runs Wordpress and due to legacy files, it has a complex structure, where some WordPress URLs also exist as folders in the directory structure.

These folders have the following .htaccess code to make WordPress work, even though they have index.html files on them and other content:

RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

# BEGIN WordPress

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTP_HOST} ^$ [NC]
RewriteRule ^(.*)${REQUEST_URI} [R=301,L]
RewriteBase /
RewriteRule ^index\.php$ - [L]
#RewriteRule . /index.php [L]
RewriteRule ^(.*) index.php [L]
On 5.3.x, visiting one of these URLs causes a 404 error not handled by WordPress. It seems the .htaccess file is ignored. However, I don't get why it doesn't load the index file neither.


Well-Known Member
It is a cPanel server but this happened already when 5.3 was first released, and that was a few weeks ago I think.

Jon K

Staff member
Hi Stormy,

Is it possible for you to log a ticket with us for us to take a deeper look into why this is happening?


LiteSpeed Staff
the issue is due to bad
RewriteBase "/"
used in sub-directory, solved by changing last rewrite rule to

RewriteRule ^(.*) /index.php [L]
which ignores the RewriteBase.