2

Bug: Site Redirect with OLS


J
Jason McOrmick

Using the Site Redirect feature with litespeed will creates *conflicting* Redirect rules between the domain's openlitespeed.conf and the .htaccess file. The .htaccess is fine, but the openlitespeed.conf rewrite rule does not match it.

To reproduce, try the following steps:
* Create a (301/whatever) Redirect from / to example.com/news.html
* Observe that the domain's .htaccess file will be correct:
Redirect 301 / example.com/news.html
* Observe that the user's openlitespeed.conf entry will incorrectly be:
RewriteRule ^//?(.*)$ example.com/news.html/$1 [L,R=301]

The difference here, is that the OpenLiteSpeed directive will typically append a slash to the target URL, which is not what we want here.

A

Activity Newest / Oldest

J

Jason McOrmick

To make things clear, the .htaccess file written is 'correct' in the sense that it's a valid Apache .htaccess file with apache-supported directives.

BUT, when you're running litespeed instead of apache, those redirect directives in the .htaccess are not supported. Instead, for openlitespeed to redirect through .htaccess, requires using RewriteRule directives instead.