Preventing hot linking of images

Question
Also known as 'bandwidth stealing', this is when someone links to an image you have stored on your website so they can display the image somewhere else without having to pay for the storage or the bandwidth..
Here's how you can stop it, right from your website using a .htaccess file.
Simply add the following code to your .htaccess text file and upload it to your root directory, or a subdirectory if you want to limit it to just the subdirectory and below..
<pre class="ip-ubbcode-code-pre">RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www\.)?example.com/.*$ [NC]
RewriteRule \.(gif|jpg)$ - [F]</pre>
If you prefer to change the image to something else.. like a nasty message or perhaps even an advertisement...
<pre class="ip-ubbcode-code-pre">RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www\.)?example.com/.*$ [NC]
RewriteRule \.(gif|jpg)$ http://www.example.com/gotcha.gif [R,L]</pre>
If your host doesn't support .htaccess files or the RewriteEngine, find another host. http://community.here.com/infopop/em...icon_smile.gif
-Jim

Answer
You need to be using Apache, and you need the ability to use the Rewrite condition as well as htaccess files. Also, you should change the http://(www\.)?example.com to your own site, such as http://(www\.)?mysite.com.

It effectively tells any requestor for jpg and gif images that are not from mysite.com (with or without the www), that it should go somewhere else to fetch an image.

You can use it with any file types, not just jpg and gif:

Instead of:
\.(gif|jpg)

Use:
\.(gif|jpg|png|bmp|html) to include PNG, BMP, and html files in the Rewrite condition.

And don't use the <pre class="ip-ubbcode-code-pre">. and </pre> and the end, that must have been converted from the old OpenTopic threads.

Answer
How would this work for many of us who use our own web hosting for eBay listings. I caught another seller hotlinking to my images for his eBay listing, but I can't think of a programmatic way to catch sellers like this. I happened to find him through old fashioned browsing/searching.

Answer
Its difficult to prevent somebody hotlinking your images for ANOTHER ebay auction because you need to allow eBay access to your images, but you only want to allow eBay access to your images for YOUR auctions, not somebody else's. You could add a simple "property of yourebayuserid" which might prevent a few people from using it, but that's about it.

I don't know if eBay's picture hosting prevents this type of thing.

Answer
Yes, I do put an image stamp for all the pictures that I take, but that does not stop people from hotlinking. You can discourage some, but nothing is foolproof to the persistent.

Answer
Unless eBay institutes something in their hosting to match your auction with your images only, then there's not a lot you can do about it.

Answer
If it was you own webserver, you could probably do something with a program.
A real wizard would figure out a way to serve the real image to his auction, and the usually scatological image to anyone else. You would have to test it carefully first.

Answer
Yeah, that's a lot of work to serve images to "valid" Item Numbers, while serving another kind to "invalid" Item Numbers. Every time your image is loaded on an eBay listing, the web server would have to check the URL. It could be done, but I'm not that interested in protecting my images since the sellers that steal bandwidth is tiny compared to other companies that work with audio, or "adult" images/videos.
© 2007 www.aqcollection.com | Contact us |