Search code examples
apachemod-proxy

How to configure Apache to proxy exactly one file?


(I must be dense - I just can't figure out the Apache documentation on how to do this.)

To speed up some swf development I'm doing, I want to have my local machine fetch my local swf when I browse to our studio's test website. Just the one local swf only - with the rest pulled from the test website.

So I set up apache on port 80 with mod_proxy and proxy_http_module, then added an entry for HOSTS to say the test server is 127.0.0.1. What I need are the magical incantations to put in httpd.conf to say "every call requesting http://test/blah goes to 10.1.1.whatever EXCEPT http://test/blah/foo.swf which goes to c:\proj\foo.swf".

Can someone help with this? Thank you.


Solution

  • There is a simple syntax for disallowing a particular URL from proxying:

    ProxyPass /blah/foo.swf !
    ProxyPass /blah http://10.1.1.whatever