mod_rewrite: LiteSpeed and QSA

Discussion in 'Apache Migration/Compatibility' started by frostschutz, Aug 22, 2009.

  1. frostschutz

    frostschutz New Member

    Hello, everyone. I'm new to these forums, if this is the wrong place for this posting, please forgive me. I ran into an issue with LiteSpeed, which is probably a bug, I'm hoping you can help me out.

    I have this rewrite rule:

    RewriteRule user-([0-9]+).html member.php?action=profile&uid=$1 [L,QSA]
    It rewrites user-123.html to member.php?action=profile&uid=123. I'm using the same rule in Apache, and (using mod_rewrite equivalents) also in Nginx and lighttpd. It's a simple rewrite so it works fine, and should also work for LiteSpeed. Or so I thought.

    LiteSpeed behaves different than other web servers in a conflict situation:


    action is specified twice, once in the URL the user typed in, and once in the rewrite rule. In Apache, Nginx, lighttpd, the PHP $_GET variable will contain 'action' => 'email' and the PHP process will output an email form.

    In LiteSpeed it's 'action' => 'profile', because whatever is specified in the rewrite rule seems to win over the actual query string in the URL that the user sees in his browser. Instead of the email form the PHP process outputs the profile page.

    Is this intended behaviour of LiteSpeed?
  2. mistwang

    mistwang LiteSpeed Staff

    It is the order of appended query string and the one from request URL.
    Fixed in updated 4.0.10 binary.

    Thanks for the bug report.

Share This Page