How do I interpolate values like %{REQUEST_FILENAME}
in the TestString part of a RewriteCond directive? Here's what I'm trying to do:
# non-existent requests to /webroot files get 404'd
RewriteCond site/%{REQUEST_FILENAME} !-f
RewriteRule ^/?webroot site/webroot/404 [L]
# otherwise, let them in!
RewriteRule ^/?webroot/(.*)$ site/webroot/$1 [L]
What I want to happen is requests going to domain.com/webroot/image.jpg be checked to see if site/webroot/image.jpg exists. Is there a way to do that?