Posted By

Orlandoo on 09/19/10


Tagged

htaccess


Versions (?)

Who likes this?

4 people have marked this snippet as a favorite

NyX
czterystaczwarty
abdulaziz
kubaitis


Prevent Hotlinking


 / Published in: Apache
 

URL: http://www.polepositionmarketing.com/seo-sem/link-building-secrets/maurizio-petrone.php

Tired of people using your bandwidth by putting the images hosted on your server on their website? Add the following code at the bottom of your .htaccess file to prevent hotlinking.

  1. Options +FollowSymlinks
  2. #Protect against hotlinking
  3. RewriteEngine On
  4. RewriteCond %{HTTP_REFERER} !^$
  5. RewriteCond %{HTTP_REFERER} !^http://(www.)?domainname.com/ [nc]
  6. RewriteRule .*.(gif|jpg|png)$ http://domainname.com/img/stop_stealing_bandwidth.gif[nc]

Report this snippet  

You need to login to post a comment.