• 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} !^https://tamba2.org.uk/.*$ [NC]
    RewriteCond %{HTTP_REFERER} !^https://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:
    https://www.scriptygoddess.com/archives/2002/05/07/protect-your-images-with-htaccess/

Viewing 15 replies - 1 through 15 (of 15 total)
  • looks interesting, thanks for the post podz – hope you sorted out the git ??

    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…

    Thread Starter Mark (podz)

    (@podz)

    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.

    didn’t work for me :/

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

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

    Thread Starter Mark (podz)

    (@podz)

    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).
    https://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.

    Error 403 – Forbidden.

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

    tamba2 AT gmail DOT com

    ??

    Thread Starter Mark (podz)

    (@podz)

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

    lol that is a mighty fine image podz – stick it to em ??

    Thread Starter Mark (podz)

    (@podz)

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

    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.

    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….)

    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} !^https://(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} !^https://(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} ^https://(www\.)?badsite\.net/ [NC,OR
    RewriteCond %{HTTP_REFERER} ^https://(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.

    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…..

Viewing 15 replies - 1 through 15 (of 15 total)
  • The topic ‘Hotlinking Thief’ is closed to new replies.