0

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!?

1 Answer 1

4

You're using the wrong symbol for the environment variable. It should be % instead of $. So the condition should be

RewriteCond %{REQUEST_URI} !^/bundles/
3
  • I should add that it took me about 5 re-readings of the post to find that...
    – Jenny D
    May 29, 2013 at 9:51
  • FINALLY!!!!!!!!
    – Hubro
    May 29, 2013 at 9:58
  • I'm glad it worked!
    – Jenny D
    May 29, 2013 at 10:02

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .