Help me stop Hotlinking

Discussion in 'Programming' started by Neouben, Jun 26, 2009.

  1. #1
    My proxy is using way too much bandwidth i added this code to stop hotlinking:
    http://www.psdproxies.com/download/hacks.txt

    but it seems it didnt work, i was checking last visits i found many websites and when i click the link it takes me directly to the site without redirecting my users to the homepage

    examples (warning both are adult sites, my users are really sick couldnt find a clean website lol):
    http://polisurf.info/index.php?q=aHR0cDovL3RlZW5zdHJ5YW5hbC5jb20vZm9ybS5odG1s

    http://polisurf.info/index.php?q=aHR0cDovL2hxdHViZS5jb20vP25hZmY9NXZnQ0FCa1IsMCwwLDAsMA==


    how can i stop this? this proxy is new and ive been suspended like 5 days lol, Iran users have used 22gb bandwidth in less than a week, should i block them?

    Thanks

    Proxy url: http://www.polisurf.info/
     
    Neouben, Jun 26, 2009 IP
  2. susan8051

    susan8051 Peon

    Messages:
    1,358
    Likes Received:
    49
    Best Answers:
    0
    Trophy Points:
    0
    #2
    RewriteEngine on
    RewriteCond %{HTTP_REFERER} !^http://(.*)yourdomain.com(.*)$      [NC]
    RewriteRule .*\.(jpg|jpeg|gif|png|bmp)$ - [F,NC]
    Code (markup):
    this is the code to prevent other sites from hotlinking to your images!
    but i think your question id different,, you need some mechanism to prevent your site from accessing external images...

    btw i think that your hack is woking properly that is why the urls that you posted here gets redirected to your homepage..(because the refere is DP and not your site..)
     
    susan8051, Jun 26, 2009 IP
  3. buchin

    buchin Active Member

    Messages:
    156
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    53
    #3
    It works dude...
     
    buchin, Jun 26, 2009 IP