I dont have one that will do that, but I have one that replaces the gif or jpg or jpeg being hotlinked with another image you specify (such as one that says "visit my site to see all of my images" with your url)
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www\.)?yourdomain.com/.*$ [NC]
RewriteCond %{REQUEST_URI} !^/replaceimage\.
RewriteRule \.(gif|jpe?g)$ /replaceimage.$1 [NC,L]
replace "yourdomain.com" with your domain of course.
replace "replaceimage" (in both places) with an unusual and unique name that you will never name a "real" image! Thats important! (name it something like: qsgrt3lkhj or something)
Then you need to create a gif, jpg and jpeg version of your image! ie:
qsgrt3lkhj.gif
qsgrt3lkhj.jpg
qsgrt3lkhj.jpeg
The code will see where the request comes from, if it isn't blank or yourdomain, and if the image being requested is NOT your "replaceimage", it will replace the image with your new image which you've made.
Hope that makes sense..
|