How do i Avoid Hotlinking and Leechers?

Discussion in 'PHP' started by hobodude666, Jul 12, 2007.

  1. #1
    Now that i got a download area up, i would hate to find my bw being used up by leechers. how do i avoid that?
     
    hobodude666, Jul 12, 2007 IP
  2. ansi

    ansi Well-Known Member

    Messages:
    1,483
    Likes Received:
    65
    Best Answers:
    0
    Trophy Points:
    100
    #2
    you can do it though mod_rewrite and .htaccess to ensure that the request is coming from your domain.

    
    RewriteEngine on
    RewriteCond %{HTTP_REFERER} !^$
    RewriteCond %{HTTP_REFERER} !^http://(www\.)?mydomain.com/.*$ [NC]
    RewriteRule \.(gif|jpg|exe|zip|rar)$ - [F]
    
    Code (markup):
     
    ansi, Jul 12, 2007 IP
  3. hobodude666

    hobodude666 Peon

    Messages:
    150
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    .htaccess in the root directory?
    is it possible to modify the php.ini?
    and my joomla uploading keeps sayng "Connection to server reset"
    i set my php.ini maxtime to 2 hrs, but it still say that.
    It seems like my htaccess file is a text. Im assuming i shudnt make it .htaccess
    does godaddy have hotlink protection like cpanelx?
     
    hobodude666, Jul 12, 2007 IP