Monthly Archives: November 2009

Stop hotlinking from outside domains by using .htaccess

You can stop the hotlinking from outsider domain by using following rule in .htaccess RewriteEngine On RewriteCond %{HTTP_REFERER} ^http://(.+.)?domain.com/ [NC,OR] RewriteCond %{HTTP_REFERER} ^http://(.+.)?domain1.com/ [NC,OR] RewriteCond %{HTTP_REFERER} ^http://(.+.)?domain2.com/ [NC] RewriteRule .*.(jpe?g|gif|bmp|png)$ /images/nohotlink.jpe [L]