Prevent Image Hotlinking


/ Published in: Apache
Save to your folder(s)

stop bandwidth theft!


Copy this code and paste it in your HTML
  1. #Stop Image Hotlinking
  2. RewriteEngine on
  3. RewriteCond %{HTTP_REFERER} !^http(s)?://(www.)?yourdomain.com [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


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.