Posted By

silviud on 06/11/11


Tagged

apache hotlinking


Versions (?)

Block hotlinking apache


 / Published in: Apache
 

you want to block other sites to hotlink your images or media files.

  1. RewriteEngine on
  2. RewriteCond %{HTTP_REFERER} !^$
  3. RewriteCond %{HTTP_REFERER} !^http://(www.)?your-domain.com/.*$ [NC]
  4. RewriteRule \.(gif|jpe?g|png|mov|avi|wmv|mpe?g)$ - [F]
  5.  
  6. # replace your-domain.com with your site domain

Report this snippet  

You need to login to post a comment.