Reputation: 2071
Im getting a headache over this.
If the requested css file has qp defined it should rewrite as line 1. But if it doesn't it should rewrite as line 2.
Why isn't this working?
RewriteRule /css/(.*).css?qp=(.*)$ /build/css.php?request=$1&qp=$2 [QSA]
RewriteRule /css/(.*).css$ /build/css.php?request=$1 [QSA]
Can anyone explain why this isn't working?
Upvotes: 1
Views: 64
Reputation: 26143
Remove leading slash from RewriteRule. It doesn't receive it. And doesn't receive Query string. Ifqp
is present, QSA
will save it. Must be enough:
RewriteEngine on
RewriteRule ^css/(.*).css$ /build/css.php?request=$1 [QSA]
Upvotes: 2