Prevent hotlinking of images - Images linked from anywhere other than your website are blocked or redirected to a custom graphic image. If using a custom graphic image be sure that the image being shown is not hotlink protected or your server can go into an endless loop.
Use the code below if you want to just prevent and block hotlink. RewriteEngine on RewriteCond %{HTTP_REFERER} !^$ RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?yourdomain.com [NC] RewriteRule \.(jpg|jpeg|png|gif|psd)$ - [NC,F,L] Use the code below if you want to show a custom graphic that replaces any/all hot linked images. RewriteEngine on RewriteCond %{HTTP_REFERER} !^$ RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?yourdomain.com [NC] RewriteRule \.(jpg|jpeg|png|gif|psd)$ http://YourOtherDomain.com/images/hotlink-image.jpg [NC,R,L]