rewrite module compat issue#3

#1
Apache is bad at documentation
However, this is what they told me
when I want to use regular expression that contain space character.

they told me that the regex should be quoted like this
Code:
RewriteCond %{THE_REQUEST} "^(?:GET|POST) / "
if you use backslash to escape like this (It has trailing space but somehow got strip off)
Code:
RewriteCond %{THE_REQUEST} ^(?:GET|POST)\ /\
Apache may misinterpret (cause 500 error).(It really happen at current version of Apache you can go try for yourself.)
And quote like this not just apply to only rewrite module but it is Directive syntax when someone want to use value that contain space character in any module the value should be quoted.

However, another syntax work for Litespeed.
Litespeed support (also has trailing space)
Code:
RewriteCond %{THE_REQUEST} ^(?:GET|POST)\ /\
but will misinterpret(but not break the request) when encounter
Code:
RewriteCond %{THE_REQUEST} "^(?:GET|POST) / "
again Litespeed compliant with Apache so Litespeed has to change.

You don't need to choose you can make Litespeed support both syntax.

I think you guys really bad at testing rewrite module (I think )I found issues every where.

No wonder there are packs of software incompatible with Litespeed.
For now I just finish my rewrite (Finally I'm able to write rewrite directive that compatible with both Apache and Litespeed (I'm creating Litespeed/Apache load balance stuck at rewrite module for days))
 
Last edited:
Top