Results 1 to 6 of 6
  1. #1

    What is the best way to prevent image linking?

    What is the best way to prevent another site from directly linking to an image on my site?

    I'm referring to using a fully qualified IMG tag, not linking via an A HREF tag.

  2. #2
    Join Date
    Jan 2004
    Location
    Miami Beach
    Posts
    42
    You can use an .htaccess file like this

    RewriteEngine on
    RewriteCond %{HTTP_REFERER} !^$
    RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?images.google.com [NC]
    RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?3dgameworld.net [NC]
    RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?3dgameworld.net/.*$ [NC]
    RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?3dgameworld.net/Downloads/action/Half-Life%20Counter-Strike/.*$ [NC]
    RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?3dgameworld.net/Downloads/action/.*$ [NC]


    RewriteCond %{REQUEST_URI} !^/bad.gif [NC]
    RewriteRule \.(gif|jpg|jpeg|png)$ http://www.3dgameworld.net/bad.gif [R,NC]
    Web Hosting by HostWire.com
    -------------------------
    Affordable. Reliable.
    -------------------------

  3. #3
    Sorry, I forgot to mention: I'm on a Windows server using ASP.

  4. #4
    Join Date
    Jan 2004
    Location
    Miami Beach
    Posts
    42
    In that case I am not sure. Sorry.
    Web Hosting by HostWire.com
    -------------------------
    Affordable. Reliable.
    -------------------------

  5. #5
    You might want to take a look at this:

    http://www.michaelbrumm.com/leechblocker.html

    Hope it helps,
    ChrisInTn

  6. #6
    I have an ASP file I wrote that does it.

    http://64.226.29.60/view-image.zip

    I use a DB to store the path of the image, then I use this ASP page to display the image.

    Chip-

Posting Permissions

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