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..Useless?

Discussion in 'General Discussion' started by nevaehdreamz, Apr 29, 2004.

  1. nevaehdreamz

    nevaehdreamz Registered

    Joined:
    Apr 29, 2004
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    I have it enabled to where you can't direct link, but if it's enabled, then a lot of visitors to my site can no longer see any images on my site. The only way it doesn't do that is if its disabled, if I allow direct requests (which is basically disabling), or if I change the allowed extentions from (jpg,jpeg,gif,png,bmp), to (.jpg,.jpeg,.gif,.png,.bmp) with periods in front of them..which also makes direct linking available.

    I tried editing the .htaccess file and all it does is change the hotlink protect section to all the settings I just mentioned.

    Is there no way of fixing this? I just have to let people steal my bw? :confused:
     
  2. dennis

    dennis Well-Known Member

    Joined:
    Apr 22, 2003
    Messages:
    88
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Singapore
    the hotlink protection in Cpanel never worked anyway since i used Cpanel 7.

    Do this manually :

    Code:
    RewriteEngine on
    RewriteCond %{HTTP_REFERER} !^[url]http://[/url]([a-z0-9-]+\.)*yourdomain.com* [NC]
    RewriteRule /* [url]http://www.yourdomain.com/hotlinkdisabled.gif[/url] [R,L]
    

    and save it as .htaccess and drop it into the folder you need to protect.

    under [NC], place the url which are allowed to hotlink.

    under [R,L] place the image u would like those leechers to see in replace of the original pic.

    Here's a sample for my gallery :

    [​IMG]
     
  3. nevaehdreamz

    nevaehdreamz Registered

    Joined:
    Apr 29, 2004
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
Loading...

Share This Page