Posted By

ederfortunatO on 02/15/12


htaccess apache

Versions (?)

Who likes this?

2 people have marked this snippet as a favorite


Prevent Image Hotlinking

 / Published in: Apache

stop bandwidth theft!

  1. #Stop Image Hotlinking
  2. RewriteEngine on
  3. RewriteCond %{HTTP_REFERER} !^http(s)?://(www.)? [NC]
  4. RewriteCond %{HTTP_REFERER} !^$
  5. RewriteCond %{HTTP_REFERER} !google. [NC]
  6. RewriteCond %{HTTP_REFERER} !search?q=cache [NC]
  7. RewriteCond %{HTTP_REFERER} !msn. [NC]
  8. RewriteCond %{HTTP_REFERER} !yahoo. [NC]
  9. RewriteCond %{REQUEST_URI} !^/images/fake_image.jpg$
  10. RewriteRule .(jpe?g|png|gif)$ /images/fake_image.jpg [NC,R,L]

Report this snippet  

You need to login to post a comment.