WEB Deny certain sites from hotlinking, not all, without setting an allow list?

Discussion in 'OT Technology' started by Jesse, Dec 19, 2007.

  1. Jesse

    Jesse PSN: iamajesse; XBL: Inhale My Rod; G8 GT crew; Ne OT Supporter

    Joined:
    Jan 12, 2005
    Messages:
    25,649
    Likes Received:
    0
    Location:
    California :: (925)
    It seems the only way to block hotlinking is to choose which sites to ALLOW hotlinking from. I do not wish to do this. I simply wish to block hotlinking from specified sites. Is this possible?

    I'm currently using the following code, but not sure if it's effective for hotlinking.

    Code:
    ## SITE REFERRER BANNING
    RewriteEngine on
    # Options +FollowSymlinks
    
    RewriteCond %{HTTP_REFERER} bluefame\.com [NC,OR]
    RewriteCond %{HTTP_REFERER} naluriseksual\.thumblogger\.com [NC,OR]
    RewriteCond %{HTTP_REFERER} kaskus\.us [NC,OR]
    RewriteCond %{HTTP_REFERER} peoplesboard\.com [NC,OR]
    RewriteCond %{HTTP_REFERER} ft24\.net [NC,OR]
    RewriteCond %{HTTP_REFERER} fatsa\.gr [NC]
    RewriteRule .* - [F]
    
    I put in offtopic's IP, and I was still able to see the image.

    Educate me? :wavey:
     
  2. thomor25

    thomor25 I make money online....

    Joined:
    Jun 11, 2000
    Messages:
    11,101
    Likes Received:
    0
    Location:
    Denver Colorado
    Code:
    RewriteEngine On
    RewriteCond %{HTTP_REFERER} ^(.+\.)?website1.com/ [OR]
    RewriteCond %{HTTP_REFERER} ^(.+\.)?website2.com/ [NC]
    RewriteCond %{REQUEST_URI} !^/stop\.gif$
    RewriteRule \.(gif|jpg|png)$ /stop.gif [NC,L]

    stop.gif would be the image you want them to see instead

    this would make whatever domain is listed not able to hotlink to content.
     
  3. Jesse

    Jesse PSN: iamajesse; XBL: Inhale My Rod; G8 GT crew; Ne OT Supporter

    Joined:
    Jan 12, 2005
    Messages:
    25,649
    Likes Received:
    0
    Location:
    California :: (925)
    Let us try.
     
  4. retorq

    retorq What up bitch??

    Joined:
    Dec 14, 2006
    Messages:
    6,061
    Likes Received:
    0
    Location:
    Mohave Desert
    They could be cached on your local machine thus you see them and you think it's not working ... open another browser and try it in there. I use Mozilla on a regular basis now so when I'm trying to figure something like this out I use IE to troubleshoot it.
     
  5. Jesse

    Jesse PSN: iamajesse; XBL: Inhale My Rod; G8 GT crew; Ne OT Supporter

    Joined:
    Jan 12, 2005
    Messages:
    25,649
    Likes Received:
    0
    Location:
    California :: (925)
    I always control+F5, or try with images I haven't seen yet.
     
  6. Jesse

    Jesse PSN: iamajesse; XBL: Inhale My Rod; G8 GT crew; Ne OT Supporter

    Joined:
    Jan 12, 2005
    Messages:
    25,649
    Likes Received:
    0
    Location:
    California :: (925)
    Code:
    RewriteEngine On
    RewriteCond %{HTTP_REFERER} ^(.+\.)?bluefame.com/ [OR]
    RewriteCond %{HTTP_REFERER} ^(.+\.)?naluriseksual.thumblogger.com/ [OR]
    RewriteCond %{HTTP_REFERER} ^(.+\.)?peoplesboard.com/ [OR]
    RewriteCond %{HTTP_REFERER} ^(.+\.)?ft24.net/ [OR]
    RewriteCond %{HTTP_REFERER} ^(.+\.)?fatsa.gr/ [OR]
    RewriteCond %{HTTP_REFERER} ^(.+\.)?naluriseksual.thumblogger.com/ [OR]
    RewriteCond %{HTTP_REFERER} ^(.+\.)?offtopic.com/ [OR]
    RewriteCond %{HTTP_REFERER} ^(.+\.)?kaskus.us/ [NC]
    RewriteCond %{REQUEST_URI} !^/stop\.gif$
    RewriteRule \.(gif|jpg|png)$ /stop.gif [NC,L]
    ftw.
     
  7. retorq

    retorq What up bitch??

    Joined:
    Dec 14, 2006
    Messages:
    6,061
    Likes Received:
    0
    Location:
    Mohave Desert
    Also I wouldn't put up too big of a pic if you disable hot linking. Most want to save bandwidth and they end up using some huge jpeg instead of showing the pic. Kinda defeats the purpose, I would just return a fail code.
     
  8. crazybenf

    crazybenf Active Member

    Joined:
    Nov 14, 2001
    Messages:
    15,575
    Likes Received:
    2
    Most people want the huge pic as a fuck you, not to save bandwidth. :o
     
  9. MrBrotato

    MrBrotato New Member

    Joined:
    Sep 7, 2005
    Messages:
    5,558
    Likes Received:
    0
    :werd:
     
  10. Yahdude

    Yahdude New Member

    Joined:
    Jun 21, 2006
    Messages:
    1,211
    Likes Received:
    0
    Location:
    PC, UT
    goat...
     
  11. Jesse

    Jesse PSN: iamajesse; XBL: Inhale My Rod; G8 GT crew; Ne OT Supporter

    Joined:
    Jan 12, 2005
    Messages:
    25,649
    Likes Received:
    0
    Location:
    California :: (925)
    it makes them stop using it, thus saving bw in the long run
     
  12. LOLZILLA

    LOLZILLA New Member

    Joined:
    Jul 11, 2004
    Messages:
    97,923
    Likes Received:
    0
    OT jacks your BW that much?
     
  13. Jesse

    Jesse PSN: iamajesse; XBL: Inhale My Rod; G8 GT crew; Ne OT Supporter

    Joined:
    Jan 12, 2005
    Messages:
    25,649
    Likes Received:
    0
    Location:
    California :: (925)
    Not blocking OT. Blocking foreign sites which I can't read the pages of.
     
  14. LOLZILLA

    LOLZILLA New Member

    Joined:
    Jul 11, 2004
    Messages:
    97,923
    Likes Received:
    0
    Would you like to touch my tra la la?
     
  15. Jesse

    Jesse PSN: iamajesse; XBL: Inhale My Rod; G8 GT crew; Ne OT Supporter

    Joined:
    Jan 12, 2005
    Messages:
    25,649
    Likes Received:
    0
    Location:
    California :: (925)
    bump since it's ftw
     
  16. 2ofdem

    2ofdem OT Supporter

    Joined:
    Jun 17, 2003
    Messages:
    114,854
    Likes Received:
    8
    Location:
    aus.vic.mel
    Nice and simple I might steal this :)
     
  17. Jesse

    Jesse PSN: iamajesse; XBL: Inhale My Rod; G8 GT crew; Ne OT Supporter

    Joined:
    Jan 12, 2005
    Messages:
    25,649
    Likes Received:
    0
    Location:
    California :: (925)
    Works wonders.

    I'm tired of bootytorrents users uploading fat bitches :rofl:
     
  18. noon

    noon get high and teach me how to listen

    Joined:
    May 4, 2002
    Messages:
    3,384
    Likes Received:
    0
    Location:
    Lawrence, KS
    dynamic huge logo watermarking on hotlinked images ftw
     
  19. Jesse

    Jesse PSN: iamajesse; XBL: Inhale My Rod; G8 GT crew; Ne OT Supporter

    Joined:
    Jan 12, 2005
    Messages:
    25,649
    Likes Received:
    0
    Location:
    California :: (925)
    meh.
     

Share This Page