I am testing out a situation where a remote webserver (serv1) hotlinks
an image (img1.gif) to my local server (serv2). With mod_rewrite, I
wish to block it and send back a different one (img2.gif). On serv2,
mod_rewrite has been tested with basic functionality (it is installed
From a doc on serv1, URIs to both img1.gif and img2.gif pointing to
serv2 work (no mod_rewrite at this point).
Now on serv2 I configure mod_rewrite:
RewriteRule .+\.(gif|jpg)$ http://serv2/img2.gif [R]
And on serv1 I point to img1.gif:
SRC = "http://serv1/img1.gif">
The page comes up but without any image.
The logs of serv2:
a) appended to access_log:
"GET /img1.gif HTTP/1.1" 302 237
"GET /img2.gif HTTP/1.1" 302 237
b) last line appended to rewrite_log:
redirect to http://serv2/img2.gif [REDIRECT/302]
c) nothing reported in error_log
Any ideas? Thanks for any clues.