Apache mod rewrite incompatibility [Again!]

Discussion in 'Bug Reports' started by Rumus.A, Apr 19, 2013.

  1. Rumus.A

    Rumus.A New Member

    Here we go
    guess what

    I'm now dealing with litespeed rewrite module again!
    I glad the rewrite module bug that I reported last time got fixed. (It may not considered to be a bug but triviality.)

    However, now I found new bug and it's very basic feature of rewrite module.
    I wonder why it still remain. (If this confirm to be a bug I think you guys done reckless at rewrite module)

    the problem is Litespeed can't unset Environment Variables
    or not recognize the expression.

    Here the test

    first create phpinfo.php and .htaccess on the same directory
    obviously what phpinfo.php does

    put this rewrite in .htaccess
    Code:
    <IfModule rewrite_module>
    RewriteEngine On
    RewriteRule ^ - [E=RVAR_DIR:directory,E=RVAR_TEST:test]
    RewriteRule ^ - [E=!RVAR_TEST]
    </IfModule>
    
    This code does nothing about URI.
    just set 2 variables and then unset 1 variable.


    now check phpinfo.

    in Apache you will got only
    RVAR_DIR=directory
    but in Litespeed
    2 variables still remain

    further more I suspect that if I group variable unset with other flag
    like this
    Code:
    RewriteRule ^ - [E=!RVAR_DIR,E=RVAR_TEST:test]
    (unset RVAR_DIR and set RVAR_TEST)
    the unrecognized part will break entire expression thus RVAR_TEST will not be set.
    (somehow Litespeed managed to break my entire rewrite file)


    Another bug I not confirmed myself but you guys should check it out
    related to previous bug I reported that I think you just fixed it carelessly.
    (I think this can't be the right behavior but you should confirm it yourself.)

    I create rewrite like this
    Code:
    <IfModule rewrite_module>
    RewriteEngine On
    RewriteRule ^ -
    </IfModule>
    It obviously does nothing.(not even rewrite anything)
    I got REDIRECT_STATUS=200 set in environment variable.

    FYI: "RewriteRule ^ -" does nothing but its main use is to set Environment Variables.
  2. mistwang

    mistwang LiteSpeed Staff

    should be addressed in 4.2.3 release.

Share This Page