Prevent Hotlinking


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

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.


Copy this code and paste it in your HTML
  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]

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

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.