Forum Moderators: phranque

Message Too Old, No Replies

Google images taking my bandwidth

         

Aleister

3:10 am on Aug 2, 2004 (gmt 0)

10+ Year Member



I have been reading up on various methods of blocking hot-linking. My web host actually has an option to block it completely, but I would still like to be able to allow hot-linking sometimes (primarily so I can have forum avatars, and certain banners on my server up on different sites).

So my question is this. Is it possible to modify my .htaccess to do the following :

1) Block hot-linking of all subdirectories (so I don't have to have the .htaccess in every directory of images I have).

2) Have 1 particular directory that does allow hot-linking (where I will put the images I want to allow it with).

Thanks!

Krapulator

6:41 am on Aug 2, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



If it's mostly Google images causing you problems, you could just shut them out with robots.txt:

User-agent: Googlebot-Image
Disallow: /

Aleister

1:49 pm on Aug 2, 2004 (gmt 0)

10+ Year Member



Looking through my logs last night I found that Google is only a small part of it. Most of it is people using 200+ KB images as their avatars in forums, which appear on thousands of their posts, which are fairly used forums so they get downloaded constantly. Several image galleries are also using them.

Reflect

3:33 pm on Aug 2, 2004 (gmt 0)

10+ Year Member



Why not use this to your advantage? If you sell items swap the image and put a layer in it using PS with your domain name/URL?

Just a tought, take a negative and make it a positive.

Take care,

Brian

Aleister

5:38 pm on Aug 2, 2004 (gmt 0)

10+ Year Member



Not a bad idea, but I do not sell anything.

I was however quite mad last night and I changed the most commonly linked images to ones in rather bad taste.

Childish I know, but it will certainly cause them to remove it. I still intend to disable hotlinking anyway. If I cannot find a way to implement the method I mentioned above, I will just disable it alltogether.

katana_one

7:06 pm on Aug 2, 2004 (gmt 0)

10+ Year Member



Try looking at the current issue of A List Apart. There is an article called "Smarter Image Hotlinking Prevention" that sounds like exactly what you are looking for.

Aleister

4:21 am on Aug 3, 2004 (gmt 0)

10+ Year Member



The article at ALA is nice, but it is not quite what I need. Their method still shows the image. It just explains how to give a message on the page saying what site it came from.

I want to disable it completely unless its in a specified directory. It may not be possible. Any ideas anyone? Thanks.

Aleister

5:39 am on Aug 3, 2004 (gmt 0)

10+ Year Member



I just realized something.

Couldn't I just disable hotlinking all-together with my root .htaccess

Then I could put a special .htaccess in the directory I want to allow hot-linking to, which would over-ride the base setting!