hotlinking

Well well, Think everyone knows it; people who linking your images, so you exceed your bandwith on your hostingprovider. Because this isn't cool, there's a solution: Using .htaccess. One note: it only works on linux!

The following rules must exist in a htaccessfile (the best option is to make a file called 1.htaccess in notepad, add the rules, and when uploaded to the hostingserver, rename it to .htaccess:

RewriteEngine on
RewriteCond %{HTTP_REFERER} !^http?://(.+.)?domain1.nl/ [NC]
RewriteCond %{HTTP_REFERER} !^http?://(.+.)?domain2.nl/ [NC]
RewriteCond %{HTTP_REFERER} !^$
RewriteRule .(jpg|jpeg|png|gif)$ url-to-hotlink-image [L]

This entry was posted in Uncategorized. Bookmark the permalink.