Some one, in a sizable way, is hotlinking to one of my images. I have anti-hotlinking for images enabled via my htaccess file but the problem is that the hotlinker is linking with a non-sensical URL. If I can just rewrite the url filename then the anti-hotlinking should work.
In my log files I see:
"GET /my-directory/s%3Cimg%20src= HTTP/1.1"
(Notice there is no file extension, nothing that indicates that the call if for an image.)
I have tried the following rewriterule forms but they don't work. I would assume it has to do with characters in the filename that need to be escaped. I have tried both of the following forms but neither works. Where does my error lie?
RewriteRule ^my-directory/s\%3Cimg\%20src\=$ http://example.com/my-directory/new.gif
RewriteRule ^my-directory/s\%3Cimg\%20src=$ http://example.com/my-directory/new.gif