How to Redirect Off-Site Image References to a Different Image
Ha! I like this one. In fact, I just saw some guys charging like $10 for a plugin that does what this code does.
You can use it to block people from linking to images on your website but if they do, you can instead show an image that says your website name on it and encourage people to go to your website – giving you some extra website traffic… nice!
RewriteEngine On
RewriteCond %{HTTP_REFERER} !^https://(.+\.)?yourdomain\.com/ [NC]
RewriteCond %{HTTP_REFERER} !^$
RewriteRule .*\.(jpe?g|gif|bmp|png)$ /images/some-image-name.jpg [L]📄 Download a PDF of This Article
