Take a look at my rewrite log:
(2) init rewrite engine with requested uri /bundles/astrupsspectacle/spectacle.css (3) applying pattern '^(.*)$' to uri '/bundles/astrupsspectacle/spectacle.css' (4) RewriteCond: input='${REQUEST_URI}' pattern='!^/app\.php' => matched (4) RewriteCond: input='${REQUEST_URI}' pattern='!^/bundles/' => matched (2) rewrite '/bundles/astrupsspectacle/spectacle.css' -> '/app.php/bundles/astrupsspectacle/spectacle.css' (2) local path result: /app.php/bundles/astrupsspectacle/spectacle.css (2) prefixed with document_root to /srv/spectacle/web/app.php/bundles/astrupsspectacle/spectacle.css (1) go-ahead with /srv/spectacle/web/app.php/bundles/astrupsspectacle/spectacle.css [OK]
It says pattern='!^/bundles/' => matched
even though it clearly doesn't. My pattern is:
RewriteCond ${REQUEST_URI} !^/bundles/
But I have also tried:
RewriteCond ${REQUEST_URI} !^bundles/
and even:
RewriteCond ${REQUEST_URI} !^bundles
And they all say "matched". What the hell!?
You're using the wrong symbol for the environment variable. It should be
%
instead of$
. So the condition should be