Litespeed 5.3.x breaks .htaccess

stormy

Well-Known Member
#1
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:

Code:
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} ^stormymondays.com$ [NC]
RewriteRule ^(.*)$ http://www.stormymondays.com%{REQUEST_URI} [R=301,L]
RewriteBase /
RewriteRule ^index\.php$ - [L]
#RewriteRule . /index.php [L]
RewriteRule ^(.*) index.php [L]
</IfModule>
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.
 

stormy

Well-Known Member
#3
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

Administrator
Staff member
#4
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?
 

mistwang

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

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