Submit Your Article Forum Rules

Results 1 to 10 of 10

Thread: How to stop someone hot linking my graphic

  1. #1

    Angry How to stop someone hot linking my graphic

    This might not be the right place.

    I am sure this been ask before,
    how to stop someone hot linking my graphics?

    Thanks for any help.

  2. #2
    Senior Member
    Join Date
    Aug 2006
    Posts
    274

    Re: How to stop someone hot linking my graphic

    Your web host should have a setting to prevent this activity. My web host's vDeck system has an option under Settings to disable HotLinking.

    Getmea

  3. #3

    Re: How to stop someone hot linking my graphic

    you can require the image loading from your pages only using the htaccess file.
    I don't remember the line but you can check the documentation of htaccess from Apache

  4. #4
    Senior Member
    Join Date
    May 2007
    Posts
    169

    Re: How to stop someone hot linking my graphic

    Here ya go, put this in htaccess
    RewriteEngine On
    RewriteCond %{HTTP_REFERER} !^http://(.+\.)?domain\.com/ [NC]
    RewriteCond %{HTTP_REFERER} !^$
    RewriteRule .*\.(jpe?g|gif|bmp|png)$ /images/nohotlink.jpg [L]
    create a very small file called nohotlink.jpg, which will replace the pic they are hotlinking to.
    In the image, you could say "Stolen from www.yourdomain.com"
    ----Don't Call Me Brian----

  5. #5

    Re: How to stop someone hot linking my graphic

    Is there a way to only disallow images from a folder for being hotlinked??

    Thanks in advance

  6. #6
    WebProWorld MVP wige's Avatar
    Join Date
    Jun 2006
    Posts
    3,138

    Re: How to stop someone hot linking my graphic

    Yes. Simply create a new .htaccess file in the folder you want to protect, with the above suggested directives. That will only cause that specific folder and it's subfolders to be blocked.
    The best way to learn anything, is to question everything.
    WigeDev - Freelance web and software development

  7. #7

    Wink Re: How to stop someone hot linking my graphic

    This happened to me once and I changed the picture they were using to my business logo, keeping the name the same. Then my logo picture was on their site.

    Of course I then I changed the name to the picture they had been using and relinked to my page.

    Thought it would be funny and I got a kick out of it.
    ObieTemp

  8. #8
    Senior Member
    Join Date
    Dec 2007
    Posts
    212

    Re: How to stop someone hot linking my graphic

    hostBrain' solution is fine, but you might want to add other authorized referrers, like the pages in Google cache.

    Jean-Luc
    200ok.eu Broken Link Checker finds 404 errors, error pages with 200 ok status, missing images, protocol errors, password protected pages, bad domain names, redirect loops, parking pages, ...

  9. #9
    Senior Member
    Join Date
    Nov 2004
    Posts
    196

    Re: How to stop someone hot linking my graphic

    IMO image control is best done through calling a script for the image and not linking directly to the image.

    Normal image (no scripts):
    Code:
    <img src='image.jpg'>
    New image (scripts):
    Code:
    <img src='myimagescript.php?image=image.jpg'>
    On your new scripting page myimagescript.php you can write all the validation code you desire before displaying the images. You can check a users is log-in status, check the referral url, etc...

  10. #10
    WebProWorld MVP cw1865's Avatar
    Join Date
    Oct 2007
    Posts
    885

    Re: How to stop someone hot linking my graphic

    Quote Originally Posted by obietemp View Post
    This happened to me once and I changed the picture they were using to my business logo, keeping the name the same. Then my logo picture was on their site.

    Of course I then I changed the name to the picture they had been using and relinked to my page.

    Thought it would be funny and I got a kick out of it.
    Thought it would be funny...it is funny. That'll teach 'em!
    Craig Walenta on Google+

Similar Threads

  1. Hi everyone I'm Eric..Stop in and say Hi
    By EricTransue in forum Introductions
    Replies: 4
    Last Post: 07-02-2009, 11:27 PM
  2. How to stop copycats?
    By aheadington123 in forum Search Engine Optimization Forum
    Replies: 9
    Last Post: 01-24-2006, 09:38 AM
  3. How do I stop unwanted sites from linking to me?
    By ritaperdue in forum Link Exchange
    Replies: 5
    Last Post: 05-29-2005, 10:43 AM
  4. Stop the PR madness!!!!
    By TippMan in forum Google Discussion Forum
    Replies: 0
    Last Post: 01-05-2005, 06:23 PM
  5. programme to stop hot linking
    By admin100 in forum The Castle Breakroom (General: Any Topic)
    Replies: 6
    Last Post: 02-18-2004, 05:20 PM

Posting Permissions

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