Stop Image Hotlinking – we have a quick tip, that can help you protect your server bandwidth. So if you are in situation that you find your pictures on another server, you can block this unwanted load.. and be happy again about your content, check this tips..
Stop Hotlinking with htaccess. Test your Image Hotlink Protection with our Hotlink Checker from altlab.com. – Would you like to stop hotlinkers? Is your web hosting bandwidth bill growing each month? No budget in getting a dedicated server? Want to test image hotlink protection for your web site? Here is information on using an htaccess file to stop hotlinking and bandwidth theft.
Example: Your site url is www.mysite.com. To stop image hotlinking from other sites and display a replacement image called qX4w7.gif from an image host, place this code in your .htaccess file:
RewriteEngine On RewriteCond %{HTTP_REFERER} !^http://(.+\.)?mysite\.com/ [NC] RewriteCond %{HTTP_REFERER} !^$ RewriteRule .*\.(jpe?g|gif|bmp|png)$ http://i.imgur.com/qX4w7.gif [L]
To stop hotlinking from specific outside domains only, such as myspace.com, blogspot.com and livejournal.com, but allow any other web site to hotlink images:
RewriteEngine On RewriteCond %{HTTP_REFERER} ^http://(.+\.)?myspace\.com/ [NC,OR] RewriteCond %{HTTP_REFERER} ^http://(.+\.)?blogspot\.com/ [NC,OR] RewriteCond %{HTTP_REFERER} ^http://(.+\.)?livejournal\.com/ [NC] RewriteRule .*\.(jpe?g|gif|bmp|png)$ http://i.imgur.com/qX4w7.gif [L]
You can display a 403 Forbidden error code instead of an image. Replace the last line of the previous examples with this line:
RewriteRule .*\.(jpe?g|gif|bmp|png)$ - [F]
Test Image Hotlinking Protection
Stop Hotlinking and Bandwidth Theft. Test your Hotlinking Protection with our Hotlink Checker.
0 Comments