Wanted: Code to Stop Images from Particular Domain Loading on my Own Site

Discussion in 'Site & Server Administration' started by Entrep, Jun 28, 2006.

  1. #1
    Hi there

    I am after a piece of code that will stop images coming from other domains from loading on my own website.

    For example, I create a webpage, and then a spammer comes along and posts a whole bunch of images from a particular domain (e.g. spam.com). How do I stop all images from the domain spam.com appearing on my own website?

    Thanks.

    PS: I am not after an anti-spam solution or something like that, I just need the code to let me achieve the above.
     
    Entrep, Jun 28, 2006 IP
  2. WhatiFind

    WhatiFind offline

    Messages:
    1,789
    Likes Received:
    257
    Best Answers:
    0
    Trophy Points:
    180
    #2
    Add on of these codes to your .htaccess file

    Deny all users to download
    <Files *.jpg>
    Order Deny,Allow
    Deny from all
    </Files>

    Deny only a specific IP adress.
    <Files *.jpg>
    Order Allow,Deny
    Deny from 69.28.130.xx
    Allow from all
    </Files>


    And nobody of just one IP adress can use any pictures from your website.


    But what you also can do is change the images.. Free advertising for you, put your url big in the images :D
     
    WhatiFind, Jun 29, 2006 IP
  3. Dreamchaser

    Dreamchaser Well-Known Member

    Messages:
    745
    Likes Received:
    17
    Best Answers:
    0
    Trophy Points:
    110
    #3
    You can enable this from your Cpanel using a option to enable or disable hot linking.

    Cheers,
    Dreamchaser
     
    Dreamchaser, Jun 29, 2006 IP