The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Hotlink

Discussion in 'General Discussion' started by Aerosmith, Nov 3, 2002.

  1. Aerosmith

    Aerosmith Well-Known Member

    Joined:
    Feb 17, 2002
    Messages:
    76
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Earth
    I am having a problem. I want to be able to set things up so that people cannot leach my bandwidth by putting my images on their site by linking to them on my server. I was under the impression that this is what hot linking is all about. However no matter what I do I can't get it to work correctly. Either I can hook into the images from any site or I block them from everyone including my own site. Can someone please give me some help on how to set this feature up correctly?

    Thanks,
    ^A^
     
  2. Annette

    Annette Well-Known Member
    PartnerNOC

    Joined:
    Aug 12, 2001
    Messages:
    445
    Likes Received:
    0
    Trophy Points:
    16
    Are you doing this through the cp or creating it yourself?
     
  3. Aerosmith

    Aerosmith Well-Known Member

    Joined:
    Feb 17, 2002
    Messages:
    76
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Earth
    I am using the control panel. Just does not seem to work as designed.
     
  4. Website Rob

    Website Rob Well-Known Member

    Joined:
    Mar 23, 2002
    Messages:
    1,506
    Likes Received:
    0
    Trophy Points:
    36
    Location:
    Alberta, Canada
    cPanel Access Level:
    Root Administrator
    This manual method works well, in document root so it covers the whole Domain:

    RewriteEngine On
    RewriteCond %{HTTP_REFERER} !^$
    RewriteCond %{HTTP_REFERER} !^http://xxx.xxx.xxx.xxx/.*$ [NC] & your IP address
    RewriteCond %{HTTP_REFERER} !^http://domain.com/.*$ [NC]
    RewriteCond %{HTTP_REFERER} !^http://www.domain.com/.*$ [NC]
    RewriteRule .*\.(gif|jpg|zip)$ - [F,L]

    It can be written other ways, but this is the one that's easiest for me to remember.

    You'll notice I've also included zip files, I've had some bad experiences in that area as well.

    Never tried it actually from within Cpanel, shall have to give it a go and see what code it spits out.
     
  5. Aerosmith

    Aerosmith Well-Known Member

    Joined:
    Feb 17, 2002
    Messages:
    76
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Earth
    I found the issue. It goes back to Norton Person Firewall and how it blocks the referer. (It changes it to weferer and does some sort of encryption.) Anyway I toggled off that option in the firewall and all works well now. I guess this will be an issue that webmasters or site owners cannot control. It is the client side that is causing the problem. I am considering adding a description of this issue to the FAQ for each of my sites.


    ^A^
     

Share This Page