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 not working right

Discussion in 'Security' started by beaureg, Jul 7, 2006.

  1. beaureg

    beaureg Registered

    Joined:
    Jul 7, 2006
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    After I enable hotlink protection on my site, I cannot see the images on my site from my computer, but I can from other computer, if I disable hotlink protection everything is ok and I can see everything from my computer

    I have looked at all my security settings and I just cannot see what is blocking the images, Images are blocked both when browsing with Firefox or Explorer and I have set their security settings to minimum,

    Removing autoprotect from Norton doesn't solve the problem

    Win XP security tells me that the antivirus is Norton and the firewall is Norton.
    I can access 99% of the sites I want to view but not mine when I enable hotlink protection on it.

    Any suggestions ?

    Thanks all in advance
     
  2. mathew_p_a

    mathew_p_a Member

    Joined:
    Apr 8, 2005
    Messages:
    22
    Likes Received:
    0
    Trophy Points:
    1
    cache

    Hotlink protection has the option for specifying which of the domains will be able to "hotlink" to that domain. The issue with the two machines on your system seems to be a wierd one. Did you try using another browser. May be clearing the browser cache can also help. :cool:
     
  3. beaureg

    beaureg Registered

    Joined:
    Jul 7, 2006
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Hotlink protection

    The main issue is that when I enable hotlink protection, then I can not see the pics from my site on my computer.
    I tried with Firefox, I emptied the cache and removed the cookies and still I cannot view the images from my computer but I can from another computer, this is a weird problem that has me baffled for a long time
     
  4. abubin

    abubin Well-Known Member

    Joined:
    Dec 7, 2004
    Messages:
    393
    Likes Received:
    1
    Trophy Points:
    18
    try enabling "Allow direct requests (ie. entering the url to an image in your browser)".

    Maybe that will help.
     
  5. beaureg

    beaureg Registered

    Joined:
    Jul 7, 2006
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    That worked ... tks

    I enabled "Allow direct requests" and it works fine, I can now see the images of my website from my own computer.
    But ... there's this guy that is leeching my pictures and even after enabling hotlink protection my pics still show on his site (that's not so much a problem since a while back I replaced the leeched images with ads for my site and he hasn't noticed yet) but I wonder what's wrong with the hotlink protection not blocking his leeching, shouldn't it ??? I also tried blocking his IP and that also doesn't work, there's something I'm not doingright but what ???
     
  6. Kerstin

    Kerstin Well-Known Member

    Joined:
    Apr 9, 2005
    Messages:
    136
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Berlin
    Hotlink protection, is that is a function of cPanel ? :( You will exclude sites from browsing similar to the option of norton antivirus.
    Which browser you have ? This will shurely do a switch in the browser setup.
     
  7. muscleboy

    muscleboy Registered

    Joined:
    Jul 10, 2006
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    california
    Hotlink protection is .htaccess

    when you try to get hotlink protection cpanel creates entries in your .htaccess file in the /public_html folder.. You might try to edit that file and delete all of the lines about 5 or six lines all having your sites name in them and followed by a final line with the file extensions you don't want people to leach..That cpanel created then put this

    when you try to get hotlink protection cpanel creates entries in your .htaccess file in the /public_html folder.. You might try to edit that file and delete all of the lines about 5 or six lines all having your sites name in them and followed by a final line with the file extensions you don't want people to leach... delete them all and just add this to enable hotlink protection on your site, open up your .htaccess file and add the following to the next available line:

    RewriteEngine on
    RewriteCond %{HTTP_REFERER} !^$
    RewriteCond %{HTTP_REFERER} !^http://(www\.)?mydomain.com/.*$ [NC]
    RewriteRule \.(gif|jpg|jpe?g|gif|bmp|png|zip)$ - [F]

    I think that's right save the file
     
    #7 muscleboy, Jul 14, 2006
    Last edited: Jul 14, 2006
  8. beaureg

    beaureg Registered

    Joined:
    Jul 7, 2006
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    This is my .htaccess file

    This is my .htaccess file

    # -FrontPage-

    IndexIgnore .htaccess */.??* *~ *# */HEADER* */README* */_vti*

    <Limit GET POST>
    #The next line modified by DenyIP
    order allow,deny
    deny from 194.109.125.222
    allow from all
    </Limit>
    <Limit PUT DELETE>
    order deny,allow
    deny from all
    </Limit>
    AuthName www.mydomain.com
    AuthUserFile /home/zzz/public_html/_vti_pvt/service.pwd
    AuthGroupFile /home/zzz/public_html/_vti_pvt/service.grp

    errordocument 404 http://www.mydomain.com/index.php

    <Files 403.shtml>
    order allow,deny
    allow from all
    </Files>

    deny from 194.109.125.220

    RewriteEngine on
    RewriteCond %{HTTP_REFERER} !^$
    RewriteCond %{HTTP_REFERER} !^http://mydomain.com/.*$ [NC]
    RewriteCond %{HTTP_REFERER} !^http://mydomain.com$ [NC]
    RewriteCond %{HTTP_REFERER} !^http://mydomain2.com/.*$ [NC]
    RewriteCond %{HTTP_REFERER} !^http://mydomain2.com$ [NC]
    RewriteCond %{HTTP_REFERER} !^http://www.mydomain3.com/.*$ [NC]
    RewriteCond %{HTTP_REFERER} !^http://www.mydomain3.com$ [NC]
    RewriteCond %{HTTP_REFERER} !^http://www.mydomain3.com/.*$ [NC]
    RewriteCond %{HTTP_REFERER} !^http://www.mydomain3.com$ [NC]
    RewriteCond %{HTTP_REFERER} !^http://mydomain4.com/.*$ [NC]
    RewriteCond %{HTTP_REFERER} !^http://mydomain4.com$ [NC]
    RewriteCond %{HTTP_REFERER} !^http://www.mydomain4.com/.*$ [NC]
    RewriteCond %{HTTP_REFERER} !^http://www.mydomain4.com$ [NC]
    RewriteRule .*\.(jpg|jpeg|gif|png|bmp)$ - [F,NC]

    Thanks all for taking the time to help
     
  9. Kerstin

    Kerstin Well-Known Member

    Joined:
    Apr 9, 2005
    Messages:
    136
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Berlin
    I belive that is quite easy to edit such files to exclude some sites ;) from browsing.
    If you have a linux system, is this possible adding a entry in the httpd.conf ? :rolleyes:
     
Loading...

Share This Page