Quote:
Originally posted by psili
You could also play with the mod_rewrite apache module (granted if it's configued).
Put this in your .htaccess file:
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://yoursite.com/.*$ [NC]
RewriteRule .*\.(jpg|jpeg|gif|png|bmp)$ http://redirectto.com/ [R,NC]
|
My apologies. I believe most people are correct in saying you can't redirect an image as all the tests from apache I've done have proven futile. And, the ideas others have shared to serve up another image of your choosing seems the best (workable) approach:
### In your .htaccess file ####
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^
http://www.yoursite.com/.*$ [NC]
RewriteRule .*\.jpg$
http://www.yoursite.com/otherimage.gif [R,NC]
So anyone trying to inline your images (jpgs) or link directly to them get served am image of your choosing. Also, the more reading I've done on "mod_rewrite" tells of how robust and server friendly (in regard to resources needed) that module is.
Anyway, good luck.