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 Protection problem

Discussion in 'General Discussion' started by Rikki, Mar 14, 2003.

  1. Rikki

    Rikki Member

    Joined:
    Mar 10, 2003
    Messages:
    20
    Likes Received:
    0
    Trophy Points:
    1
    Hi folks,

    I've been trying out the hotlink protection system on my site, diverting any hotlinked images to a "dont steal our bandwidth" image, but some users have complained that when they log onto my site thats all they see instead of the images that should be there.

    Has anyone else heard of this type of problem ?

    Many thanks,

    Rikki
     
  2. ozzi4648

    ozzi4648 Guest

    This has been a problem that i reported back in November 2002. It still doesnt work. If you turn it on all images dont appear. Others say place / on the end on the url but that doesnt work either. So i just let people steal images. What else can i do?
     
  3. darksoul

    darksoul Active Member

    Joined:
    Feb 20, 2003
    Messages:
    40
    Likes Received:
    0
    Trophy Points:
    6
    Re: Re: Hotlink Protection problem

    read a tutorial about hotlink protection, as there are plenty on the net, and setup your .htaccess file
     
  4. ozzi4648

    ozzi4648 Guest

    Re: Re: Re: Hotlink Protection problem

    I dont need to read any tutorials. I know about htaccess! Whats the point of having an option in the CP if it doesnt work properly. Any idiot can use the CP to try to get it to work but why should they be asking us to modify their htaccess files to fix the obvious problems? So i guess 200+ users want their hotlinking to work so i have to drop to their .htaccess files to fix what Cpanel is not doing for 200+ sites? Thats unrealistic and stupid.
     
  5. darksoul

    darksoul Active Member

    Joined:
    Feb 20, 2003
    Messages:
    40
    Likes Received:
    0
    Trophy Points:
    6
    Re: Re: Re: Re: Hotlink Protection problem

    Ok. I got your opinion.
    My belief is that "unrealistic and stupid" means
    to let your images to be hotlinked just because
    the cpanel future doesn't work.
    But thats just my opinion.
     
  6. Rikki

    Rikki Member

    Joined:
    Mar 10, 2003
    Messages:
    20
    Likes Received:
    0
    Trophy Points:
    1
    Hi and thanks for your replies.

    Can someone help me with this htaccess thing and how I can set it up manually.

    Many thanks

    Rikki
     
  7. 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
    Put the following in an .htaccess located in Document Root for the site:

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

    You'll notice the last line also includes 'zip' files as I've had problems with people hot linking those as well.
     
  8. Rikki

    Rikki Member

    Joined:
    Mar 10, 2003
    Messages:
    20
    Likes Received:
    0
    Trophy Points:
    1
    B rilliant!

    But where do I put the JPG file to show when people link to images ?

    Thanks

    Rikki
     
  9. ozzi4648

    ozzi4648 Guest

    Correct and also if you are seving images from https:// include those as well.
     
  10. Annette

    Annette Well-Known Member
    PartnerNOC

    Joined:
    Aug 12, 2001
    Messages:
    445
    Likes Received:
    0
    Trophy Points:
    16
    Do you really want to bother with that? They'll still be chewing through whatever your transfer allowance is because you'll still be serving up images to them. Just let it be a broken image on their side and move on.
     
  11. HankScorpio

    HankScorpio Registered

    Joined:
    Feb 26, 2003
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    I found that cPanel appends extra spaces at the ends of the lines in the htaccess file, if you remove the extra spaces, the cpanel generated file works fine.
     
  12. matnet43

    matnet43 Registered

    Joined:
    Aug 28, 2004
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    hotlink protection problems here too.

    I have the same problem. I enabled hotlink protection and have gotten numerous complaints about broken image links. I have 3 computer at home, after enabling hotlink I can only view images from my site on one of my computers. The windows xp machine can surf the site fine, but both win98 machines display broken images. The site works in Opera on all 3 computers . So it seems to be an ie thing.

    Does anyone know why this is happening? Thanks
     
  13. bman

    bman Well-Known Member

    Joined:
    Dec 28, 2003
    Messages:
    119
    Likes Received:
    0
    Trophy Points:
    16
    as i see it if the user has some kind of protaction firewall like norton internet security it will not show the HTTP_REFERER url your accessing the images from and they will be blocked from seeing the images.
    so useing .htaccess wil not help much because now days every one has some kind of protaction because hideing http_referer is part of most privacy protaction programes.
     
Loading...

Share This Page