Stop Hotlinking
Ex: Your site is www.myblog.com. To stop hotlinking of your images from other sites and display a other image called nothotlink.jpe placed in your images directory, place this code in your .htaccess file:
RewriteEngine On
RewriteCond %{HTTP_REFERER} !^http://(.+\.)?myblog\.com/ [NC]
RewriteCond %{HTTP_REFERER} !^$
RewriteRule .*\.(jpe?g|gif|bmp|png)$ /images/nothotlink.jpe [L]
For stop hotlinking from specific outside domains only, such as myspace.com and blogspot.com but allow any other site to hotlink images:
RewriteEngine On
RewriteCond %{HTTP_REFERER} ^http://(.+\.)?myspace\.com/ [NC,OR]
RewriteCond %{HTTP_REFERER} ^http://(.+\.)?blogspot\.com/ [NC]
RewriteRule .*\.(jpe?g|gif|bmp|png)$ /images/nothotlink.jpe [L]
Categories: Bookmarks, Hosting hotlinking images, htaccess file, HTTP_REFERER, RewriteEngine On, RewriteRule








