1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Hotlink Prevention - Having Problems

Discussion in 'Apache' started by Such Great Heights, Feb 10, 2005.

  1. #1
    Has anyone had any problems with hotlink protection?

    hotlink protection = only allowing certain sites/domains to access images on your server. (ie. so people don't directly link to your image in a signature on a very active forum and waste your bandwidth.) We have it set so that when an image is hotlinked we redirect them to a small image file that says they are hotlinking.

    We have hotlink protection on and for the most part it seems to work very well.
    I can only believe this because we have plenty of "customers"/web site visitors that go through our "buying process" (aka use the site just fine).

    Recently 2 people have written to us saying all they see is this one hotlinking image repeated everywhere on the site. :confused: So basically all the images are being identified as being hotlinked and are shown to be this one image. Hence they don't like the site and assume it's broken.

    Has anyone had experience with this problem?
    Would you know what is causing this? (they are arriving in frames. or proxy?)
    Is there an easy fix?

    Thanks for your help in advance. :)
    SGH
     
    Such Great Heights, Feb 10, 2005 IP
  2. Such Great Heights

    Such Great Heights Peon

    Messages:
    715
    Likes Received:
    19
    Best Answers:
    0
    Trophy Points:
    0
    #2
    I realized I should have left our hotlinking code we are using and our URL in the post above.

    This code was generated for us by cPanel's hotlinking tool. And this is what it put in the .htaccess file.
    We've tried other code before and those seemed to give us problems, but this one seemed like it was working.
    RewriteEngine on
    RewriteCond %{HTTP_REFERER} !^$
    RewriteCond %{HTTP_REFERER} !^http://(www\.)?ebay.com(/)?.*/.*$      [NC]
    RewriteCond %{HTTP_REFERER} !^http://(www\.)?ebay.com(/)?.*$      [NC]
    RewriteCond %{HTTP_REFERER} !^http://(www\.)?google.com(/)?.*/.*$      [NC]
    RewriteCond %{HTTP_REFERER} !^http://(www\.)?google.com(/)?.*$      [NC]
    RewriteCond %{HTTP_REFERER} !^http://(www\.)?mables.com(/)?.*/.*$      [NC]
    RewriteCond %{HTTP_REFERER} !^http://(www\.)?mables.com(/)?.*$      [NC]
    
    RewriteRule .*\.(gif|jpg)$ http://www.mables.com/hotlink.bmp [R,NC]
    Code (markup):
    Our URL is www.mables.com

    If you visit our site and see all yellow hotlink images please let me know if there are any unique aspects of your internet connection, or browsers, or certain software, etc..

    Does your site allow hotlinking, and if not how do you prevent it?

    Thanks
     
    Such Great Heights, Feb 13, 2005 IP
  3. Smyrl

    Smyrl Tomato Republic Staff

    Messages:
    13,740
    Likes Received:
    1,702
    Best Answers:
    78
    Trophy Points:
    510
    #3
    No answer just another problem.

    I had a power point presentation up on a site and enabled hotlink protection. Then found the power point presentation would not work.

    Shannon
    --------
    I also believe I had trouble with a 302 redirect going to a domain name with hotlink protection as well.

    S
     
    Smyrl, Feb 13, 2005 IP
  4. Such Great Heights

    Such Great Heights Peon

    Messages:
    715
    Likes Received:
    19
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Yeah sounds like it works sometimes, but not others.

    Hows should one protect their images from being hotlinked to and used excessively by others, on places like message boards and the like?

    I can't believe everyone just doesn't care, and there has to be sites that are wasting bandwidth because of hotlinkers.

    Anyone else care to share?
     
    Such Great Heights, Feb 13, 2005 IP
  5. J.D.

    J.D. Peon

    Messages:
    1,198
    Likes Received:
    65
    Best Answers:
    0
    Trophy Points:
    0
    #5
    I don't see this as a serious bandwidth problem. An average image on a non-photo-kind site is about 5-10 KB. Your website ends up serving a BMP file (hotlink.bmp), which, BTW, is 30 KB in size.

    Also, if you want search engines to see images, you have to list more rules. May be much more. For example, google.com actually comes worldwide in many international flavors (i.e. google.se, google.de, etc).

    How many times somebody from the outside would link to your images, anyway, say, compared to the regular requests? Do you have stats on this?

    J.D.
     
    J.D., Feb 13, 2005 IP