Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 15 of 15
  1. #1
    New to the CF scene
    Join Date
    Jun 2003
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Preventing leeching of images

    I have followed the tutorial at this link to stop images being leeched from our site.

    In testing though, some people visiting this this off-site link can see the image all the time, some people see it but then cannot if they force a refresh.

    What is missing from this tutorial in this first link? What am I doing wrong?

  • #2
    Regular Coder
    Join Date
    Feb 2003
    Location
    California
    Posts
    925
    Thanks
    0
    Thanked 0 Times in 0 Posts
    don't understand what you are trying to do, that site you posted is about linking of your images...there is no way to protect your images without the use of watercolor as I have heard. Your source is always available and your pictures will always be vulnerable to be taken. So what are you trying to do?


    Jason

  • #3
    New to the CF scene
    Join Date
    Jun 2003
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Clarification

    The first link suggests that a .htaccess file on my site will cause links to images from outside my site to 'break' and not display.

    I have implemented a .htaccess file as described in the first link.

    On the second link I have posted an image link (in the signature) back to my site. According to the tutorial, the image (in the signature) should not display. However, the feedback that I'm getting from people who have followed that 2nd link is that the image does not display for some people, but it does for others.

    This suggests that the tutorial (in the first link) is not a COMPLETE description of the contents of .htaccess that I need to implement.

  • #4
    Regular Coder
    Join Date
    Feb 2003
    Location
    California
    Posts
    925
    Thanks
    0
    Thanked 0 Times in 0 Posts
    ok, then what is the image that you are trying to have broken or what? cause in that example you will need to add the "." extensions for the files you want broken...if its a .png like your "board" thing then you need to have the line
    RewriteRule \.(gif|jpg|png)$ - [F]
    this way it looks at all files with the .gif, .jpg, .png and breaks them all....is that what you need?


    Jason

  • #5
    New to the CF scene
    Join Date
    Jun 2003
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks yes I had already amended that line already to include png and jpeg.

    But what I am asking is why some people who follow the second link CAN see the signature image and why others CANNOT.

    It's like the .htaccess file works for some people but not others.

  • #6
    Regular Coder
    Join Date
    Feb 2003
    Location
    California
    Posts
    925
    Thanks
    0
    Thanked 0 Times in 0 Posts
    so let me get this straight, you are using Apache as your web server, you created a file called ".htaccess" and in that added the broken link or whatnot garbage to prevent leeching of your images. You placed it into a directory that has subdriectoris for your pictures and thus will prevent leeching of them...is that correct? And its still not working?

  • #7
    New to the CF scene
    Join Date
    Jun 2003
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Apache is my web server yes.

    I placed this .htaccess file at the root of my site, NOT in the Images folder

    RewriteEngine on
    RewriteCond %{HTTP_REFERER} !^$
    RewriteCond %{HTTP_REFERER} !^http://(www\.)?rct2.com/.*$ [NC]
    RewriteRule \.(gif|jpg|jpeg|png)$ - [F]
    The image I am linking to is in the Images folder. And as I say, some people say that they can see it from the 2nd link I gave, and others say they cannot.

  • #8
    Regular Coder
    Join Date
    Feb 2003
    Location
    California
    Posts
    925
    Thanks
    0
    Thanked 0 Times in 0 Posts
    did you run a chmod on it to 644 so that it is read by all and write by you and not executable? that was the other requirement in that tutorial, other then that...if the site isn't yours and you aren't running the apache server, maybe .htaccess is off and it needs to be turned on since it is a memory hog prog...


    Jason

  • #9
    New to the CF scene
    Join Date
    Jun 2003
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Yes file is 644.

    I don't run the apache server but I'm sure that .htaccess is ON as I have asked my host.

  • #10
    Regular Coder
    Join Date
    Sep 2002
    Location
    British Columbia
    Posts
    235
    Thanks
    0
    Thanked 0 Times in 0 Posts
    If a users browser does not send the referer information with the HTTP request, what happens when this .htaccess method is put in place?

    I really do wonder. Maybe this could be creating your situation.

  • #11
    New to the CF scene
    Join Date
    Jun 2003
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts
    It apears that the tutorial I followed does not warn of the problems that this approach can bring to the surface.

    For example visitors legitimately visiting my site (not 'leeching') who have Norton Firewall on their PCs configured with the default configuration are not seeing the images because the firewall is hiding the referer information.

    However that doesn't explain why when sites ARE leeching, the graphics are still visible.

    Perhaps I have been fooled by a tutorial which describes a very simple solution to a problem that is bugging our site, but which in actuality causes more problems than it fixes.

  • #12
    Regular Coder
    Join Date
    Sep 2002
    Location
    British Columbia
    Posts
    235
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Actually, the method given is quite commonly used. I actually used that same website to do this for my website, however I never noticed any problems with it.

    Putting the given code in an .htaccess file is a very common way to prevent hot-linking.

  • #13
    New to the CF scene
    Join Date
    Jun 2003
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I never noticed any problems either. Regrettably, my visitors do.

  • #14
    Senior Coder
    Join Date
    Jun 2002
    Location
    UK
    Posts
    1,137
    Thanks
    0
    Thanked 0 Times in 0 Posts
    are there any blank lines in the file?

    scroots
    Spammers next time you spam me consider the implications:
    (1) that you will be persuaded by me(in a legitimate mannor)
    (2)It is worthless to you, when i have finished

  • #15
    New to the CF scene
    Join Date
    Jun 2003
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts
    There are yes, but the problem also occurred when there were not, unless there were some extra <CR><LF> at the end of the file.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •