4

I have this rewrite rule for a webservice:

RewriteEngine on
RewriteBase /
RewriteRule ^service/(.*)$ blabla/service.php?request=$1 [L]

It's working fine, but now I need to append the query string and found the QSA flag. I added it next to the L, but it seems to break mod_rewrite, because I get a 500 from Apache and my php script is not reached.

RewriteRule ^service/(.*)$ blabla/service.php?request=$1 [QSA, L]

What am I doing wrong?

bigstones
  • 15,087
  • 7
  • 65
  • 82

1 Answers1

6

...it seems that mod_rewrite doesn't like white spaces between flags.

RewriteRule ^service/(.*)$ blabla/service.php?request=$1 [QSA,L]
                                                             ^

This fixed the problem (sigh).

bigstones
  • 15,087
  • 7
  • 65
  • 82