View Full Version : Need some more help to stop hotlinking
PhunkyMonkey
09-29-2006, 10:27 AM
I while ago I asked about adding a code to my htacess page to block myspace from hotlinking my images. I have managed to block the main pages, but profile.myspace.com is still getting through (over 1,000 hits this month from one girls page, grr!)
I tried adding profile.myspace.com to the htaccess page, and I can't see my image on her page, but apparently I got the code wrong because the statistics keep going up. Here is what I have ~
RewriteEngine on
RewriteCond %{HTTP_REFERER} myspace\.com [NC,OR]
RewriteCond %{HTTP_REFERER} profile\.myspace\.com [NC]
RewriteRule .* - [F]
#
Also ~ I would REALLY like to know if there is an easy way to mark certain images or pages for no-hotlinking.
I would still like people to be able to post in image on a blog where they are talking about it and give a link, but stop people from using other images as backgrounds or icons. They use certain types of images for that (pictures of patchwork close-up, or of my patches), so if I could block those beforehand I think it would knock out most of the random hotlinking. (I mean, just right-click and save the image people!)
Thank you so much!
Andilinks
09-29-2006, 01:38 PM
Does the amount of bandwidth go up or just the number of hits?
Until the myspace member removes the image the hits will keep coming and will be recorded on your logs but the image won't download and the bandwidth used for each hit will be the size of your 404 page. You cold trim the 404 page to its absolute minimum but after that there's little more you can do.
Changing your image file name and then replacing the old image with something that will catch her attention in a negative way may get her to remove the image.
Andi
Juan G
09-29-2006, 02:33 PM
Changing your image file name and then replacing the old image with something that will catch her attention in a negative way may get her to remove the image.
That's an interesting possibility. For example, something similar to this nice replacement image (http://www.aota.net/forums/showthread.php?postid=76207#post76207), from a Deb's post. :wink:
PhunkyMonkey
09-29-2006, 02:49 PM
That is what I was doing before, changing it to another image ~ I have an image of a red X over a black background. They quickly notice and remove it with that becomes their repeating background image! But it is such a hassle to re-name the original file, change it in your code, and upload and re-name the X file every time.
I thought that adding the htaccess code would keep the image from loading at all (not even an "x" graphic), and that it would no longer show up on my statistics. When I added the code the myspace stats dropped from hundreds to 2 suddenly, so I thought that was why.
I wish I could just block specific images and that would solve so much! :hrmm:
richpee
10-02-2006, 11:38 AM
You could do what a number of people do and instead of changing to the "X", upload some real offensive or insulting image to make it very undesirable to come after your images. If it's just one or two people, you may want to educate them. MySpace users aren't always the brightest bulbs in the brick sack.
PhunkyMonkey
10-02-2006, 11:45 AM
Yes, but it is always random people (teenage girls usually). I doubt any of them would ever buy something from my store, I'm pretty sure most of them found the images through a google search and haven't been to my site... but I don't want to give my store a bad rep. and run off potential customers either.
Hopefully when they realize the image won't load as their background, they will choose something else. (It was never a huge problem until myspace got popular)
Juan G
10-02-2006, 12:46 PM
I'm pretty sure most of them found the images through a google search and haven't been to my site...
Possibly your robots.txt file at FutureQuest (for Google, etc.) is something like this:
User-agent: *
Disallow: /stats/
You may add some lines for images, such as:
Disallow: /images/
Disallow: /*.gif$
Disallow: /*.jpg$
Disallow: /*.jpeg$
Disallow: /*.jpe$
Another interesting one:
Disallow: /cgi-bin/
Some related info:
Remove an image from Google Image Search (http://www.google.com/support/webmasters/bin/answer.py?answer=35308)
Robots Exclusion (http://www.robotstxt.org/wc/exclusion.html)
Juan G
10-02-2006, 05:26 PM
Also, you may see other threads on hotlinking (http://www.aota.net/forums/showthread.php?postid=145888#post145888), and for example these links (of course being careful if using mod_rewrite, to avoid loops, etc.):
http://altlab.com/hotlinking.html
http://altlab.com/htaccess_tutorial.html
http://en.wikipedia.org/wiki/Inline_linking
http://en.wikipedia.org/wiki/.htaccess#Prevent_hotlinking_of_images
But, as a collateral damage, you might also stop legitimate requests:
http://mtsix.com/articles/2006/04/reasons-not-to-hotlink-protect-your-images.html
Arthur
10-03-2006, 05:59 AM
profile.myspace.com is still getting through (over 1,000 hits this month from one girls page, grr!) FWIW, I did a quick search on your access logs and those 1000+ hits were all "403 Forbidden".
The image is not being displayed because of the referrer check, but the request will still be logged in your access log.
If you go to your stats -> All URLs, you'll see the number of times a "Code 403 Forbidden" was sent.
-Arthur
vBulletin® v3.6.8, Copyright ©2000-2009, Jelsoft Enterprises Ltd.