Apache2 RewriteRule to LiteSpeed RewriteRule Question


New Member
I am trying to get my RewriteRule from my old Apache2 host to a LiteSpeed host to work. Here is my current .htaccess file from my old host:

RewriteEngine On

RewriteCond %{REQUEST_URI} ^/backup/$
RewriteRule ^(.*)$ /index.php?/$1 "[L,QSA,B= ?,BNP]"

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php?/$1 "[L,QSA,B= ?,BNP]"

RedirectMatch 404 ^/\.git
It seems that the above will not work properly on the LiteSpeed host. From what I have tested, it is specifically the B= ?,BNP flags in my RewriteRule. Does LiteSpeed have both of those flags? If I remove the "= ?,BNP" then they seem to work but then I am not able to escape non-alphanumeric characters before applying the transformation and escape the space character in a backreference to %20 rather than '+'.

Thanks in advance for your help!