how to serve other content when your domain finds hot link

put this code to htaccess file

RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www\.)?mydomain.com/.*$ [NC]
RewriteRule \.(gif|jpg)$ http://www.mydomain.com/bull-shit-man.gif [R,L]

 

Using .htaccess, we can disallow hot linking on your server, so those attempting to link to an image or CSS file on your site,
for example, is either blocked (failed request, such as a broken image) or served a different content (ie: an image of an angry man) .
Note that mod_rewrite needs to be enabled on your
server in order for this aspect of .htaccess to work.

 

 

save your domain traffic and bandwith and who is using it shows it to the viewer ; it would give you two benefits it would first disheart the viewer
to check which one is deceiving him and second dishearting hot link