.htaccess Block hot linking from specific domains

Share:
  RewriteEngine On  
  RewriteCond %{HTTP_REFERER} ^http://(.+\.)?myspace\.com/ [NC,OR]  
  RewriteCond %{HTTP_REFERER} ^http://(.+\.)?blogspot\.com/ [NC,OR]  
  RewriteCond %{HTTP_REFERER} ^http://(.+\.)?livejournal\.com/ [NC]  
  RewriteRule .*\.(jpe?g|gif|bmp|png)$ /images/nohotlink.jpe [L]  

RewriteEngine On 
RewriteCond %{HTTP_REFERER} ^http://(.+\.)?myspace\.com/ [NC,OR] 
This condition was not met but the OR option made it pass

RewriteCond %{HTTP_REFERER} ^http://(.+\.)?blogspot\.com/ [NC,OR] 
This condition was not met but the OR option made it pass

RewriteCond %{HTTP_REFERER} ^http://(.+\.)?livejournal\.com/ [NC] 
This condition was not met but the previous OR option made it pass

RewriteRule .*\.(jpe?g|gif|bmp|png)$ /images/nohotlink.jpe [L]  
This rule was met, the new url is http://www.myspace.com/images/nohotlink.jpe
The tests are stopped because the L in your RewriteRule options

No comments

'; (function() { var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true; dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js'; (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq); })();

Ads