WordPress.org

Ready to get started?Download WordPress

Forums

Hotlinking Thief (16 posts)

  1. Mark (podz)
    Support Maven
    Posted 9 years ago #

    My site is currently being copied by a thieving b*stard on Blogger. A quick hunt for solutions turned up this damned useful snippet of code from Scriptygoddess

    RewriteEngine on
    RewriteCond %{HTTP_REFERER} !^$
    RewriteCond %{HTTP_REFERER} !^http://tamba2.org.uk/.*$ [NC]
    RewriteCond %{HTTP_REFERER} !^http://www.tamba2.org.uk/.*$ [NC]
    ReWriteRule .*.(png|gif|jpg)$ - [N,F,L]

    You may need these two lines at the top of that:
    Options +FollowSymlinks
    Options +SymlinksIfOwnerMatch

    Replace your domain name where mine is.
    Save this as .htaccess
    Upload to your images directory
    Put one in each image directory if you have several.

    There are many ways of blocking this sort of crap, but this works and it's quick. It's not going to harm to drop this code in anyway.

    ScriptyGoddess Link:
    http://www.scriptygoddess.com/archives/2002/05/07/protect-your-images-with-htaccess/

  2. Jinsan
    Member
    Posted 9 years ago #

    looks interesting, thanks for the post podz - hope you sorted out the git ;)

  3. jennmiller
    Member
    Posted 9 years ago #

    Great that you're able to stop the image theft, but don't his archives and all posts reside on your account? They all have your address. It's very confusing as to why...

  4. Mark (podz)
    Support Maven
    Posted 9 years ago #

    It's a very odd theft, yes.
    When I've got time I'll be tackling the rest.

    Great isn't it ?
    Google comes in and steals your images to show to the world, Blogger (owned by Google) allows the same and in both cases there is no proper way of redress, just generic addresses.

  5. samer
    Member
    Posted 9 years ago #

    didn't work for me :/

  6. feverinlove
    Member
    Posted 9 years ago #

    I would like to let my visitors watch a video but they should not be able to do download. And the video should not be hotlinked by other websites... How can I do this with htaccess? Do you have a code for that :)

  7. vkaryl
    Member
    Posted 9 years ago #

    Podz, you need to file a DCMA with Google and Blogger. They're pretty good about that, if about nothing else....

  8. Mark (podz)
    Support Maven
    Posted 9 years ago #

    Google gave up on me - all I got were bot responses. Feeling more than a little cheesed off, I ran with a header image:

    "Google
    You create, We steal"
    in their colours (looked damn good actually).
    http://www.tamba2.org.uk/T2/pix/header/google.jpg
    (Feel free to distribute widely)

    Note: If you want to see that, copy/paste the address into a new browser window. Just clicking it will get you a 403
    They then spidered my site and refused to return me in any results so I banned them.

  9. Jinsan
    Member
    Posted 9 years ago #

    Error 403 - Forbidden.

    Apologies
    Email me with your details and
    I will sort it out

    tamba2 AT gmail DOT com

    :)

  10. Mark (podz)
    Support Maven
    Posted 9 years ago #

    From the above link ?
    Ohhhhhhhh.......direct linkage is killed ..... head to my blog first or copy/paste that into a new window ?

  11. Jinsan
    Member
    Posted 9 years ago #

    lol that is a mighty fine image podz - stick it to em :)

  12. Mark (podz)
    Support Maven
    Posted 9 years ago #

    I'm not claiming the credit for that image. When the creator wishes to be known - no doubt when he is safe from the wrath of the big G - I will backup his claim :)

  13. Jinsan
    Member
    Posted 9 years ago #

    it's rather sad that google has turned into just a big a corporate monster as anyone else. gone are the days of the geek and friend, now it's 80s power dressing and shoulder pads to protect them from reality.

  14. vkaryl
    Member
    Posted 9 years ago #

    Hey, Podz, I like that. Pretty cool! It's shameful that they won't respond to crap like you're dealing with, y'know? I don't use them much any more anyway (yeah, I know no one else is "quite as good", but I get by with the others even though what passes for their "interfaces" gags me with a spoon.... the day I need a "gateway" for ANYTHING on the 'net is the day I give it up....)

  15. Ringo
    Member
    Posted 9 years ago #

    Here's some other ways to be .htacess clever:
    For example this will stop outside domains from linking to your site and display a jpg called nohotlink.jpg ..... what you put on that jpg is up to you :)

    RewriteEngine On
    RewriteCond %{HTTP_REFERER} !^http://(www\.)?yoursite\.com/ [NC
    RewriteCond %{HTTP_REFERER} !^$
    RewriteRule \.(jpe?g|gif|bmp|png)$ images/nohotlink.jpg [L]

    More often then not I use this:
    This only allows "hotlinking" if the referer is from a specific directory on your domain.

    RewriteEngine On
    RewriteCond %{HTTP_REFERER} !^http://(www\.)?yoursite\.com/dir/ [NC
    RewriteCond %{HTTP_REFERER} !^$
    RewriteRule \.(jpe?g|gif|bmp|png)$ images/nohotlink.jpg [L]

    If your really only concerned with a particular doman that seems to be doing hotlinking you can use this approach:

    RewriteEngine On
    RewriteCond %{HTTP_REFERER} ^http://(www\.)?badsite\.net/ [NC,OR
    RewriteCond %{HTTP_REFERER} ^http://(www\.)?badsite\.com/ [NC
    RewriteRule \.(jpe?g|gif|bmp|png)$ images/nohotlink.jpg [L]

    Of course you may not want to use the "one finger salute" jpg I use to notify leachers that they are not allowed, if that is the case you can just replace the very last line in all 3 examples with this and they will get a "403 Forbidden Access" page.

    RewriteRule \.(jpe?g|gif|bmp|png)$ - [F]

    Of course mod_rewrite has to be running on your server for this to work.

  16. genosypheus
    Member
    Posted 8 years ago #

    Ringo, it works, thanks. btw, i still am trying to get over the shock from that lemonparty.something that you've posted elsewhere....pls don't do that again.....

Topic Closed

This topic has been closed to new replies.

About this Topic