Prevent Hotlinking Via Image Display
Saturday, July 1st, 2006 at 8:45 am
Display an image when people try to steal your bandwidth.
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^http://(www\.)?yourdomain1.com(/)?.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://(www\.)?yourdomain2.com(/)?.*$ [NC]
# keep adding domains as you like
RewriteRule .*\.(gif|jpg|jpeg|bmp)$ http://www.yourdomain.com/img/stopstealing.jpe [R,NC]
# not the above image has .jpe extension not .jpg
# this prevent recursion
This entry was posted by Tim
on Saturday, July 1st, 2006 at 8:45 am and is filed under Apache, Web Development.
You can follow any responses to this entry through the RSS 2.0 feed.
You can skip to the end and leave a response. Pinging is currently not allowed.
Leave a Reply
You must be logged in to post a comment. If you don't have an account register one now.