Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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

share|improve this question

1 Answer 1

up vote 4 down vote accepted

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

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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.