When Others Are Stealing Your Bandwidth By Linking Back To Your Images

If others are increasing your bandwidth by linking back to your images you can use thisĀ Apache re-write rule for preventing this activity on your site. Open your .htaccess file and add the following lines replacing sangkrit.com with your own domain name:

RewriteEngine on
RewriteCond %{REQUEST_FILENAME} .(gif|jpe?g|png)$ [NC] RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !(www.)?sangkrit.com [NC] RewriteCond %{HTTP_REFERER} !google. [NC] RewriteCond %{HTTP_REFERER} !search?q=cache [NC] RewriteRule (.*) – [F,NC,L]

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.