WordPress.org

Ready to get started?Download WordPress

Forums

How to show my uploaded images on my site only? (8 posts)

  1. neha_joshi_rocks
    Member
    Posted 10 months ago #

    I have a blog with lots of images uploaded on it.
    Many people are copying my images links and butting them on their sites.
    I wants to restrict my images to show on my domain only.
    Any idea how should I do it?

    Please tell me, it is very important for me.

  2. Media X
    Member
    Posted 10 months ago #

    Basically, there's no way you can stop people from "stealing" your images. You might consider using a watermark for them. There are some interresting watermark plugins for that purpose.

  3. Dave Naylor
    Member
    Posted 10 months ago #

    If you want to prevent hotlinking, add this to your .htaccess file (if you use one):

    <IfModule mod_rewrite.c>
    RewriteCond %{HTTP_REFERER} !^$
    RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?example.com [NC]
    RewriteRule \.(gif|jpe?g?|png)$ - [NC,F,L]
    </IfModule>

    Obviously replace example.com with your own domain.

  4. neha_joshi_rocks
    Member
    Posted 10 months ago #

    @WPRanger

    I tried this code but this is not working.
    An idiot is copying my whole website and hotlinking all my images.
    Whenever someone searching for my site, his site is shown on google.
    I wants to show some other image whenever someone hotlink my images.
    Here is my site.
    http://www.hotmug.org/

    Here is the code on my .htaccess

    # BEGIN WordPress
    
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    
    RewriteCond %{HTTP_REFERER} !^$
    RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?hotmug.org [NC]
    RewriteRule \.(gif|jpe?g?|png)$ - [NC,F,L]
    </IfModule>
    
    # END WordPress

    Am I doing everything right?
    I also wants to add a custom image which should be shown whenever someone hotlink my images.

    Plz help.

  5. Media X
    Member
    Posted 10 months ago #

    As suggested here
    RewriteRule \.(jpg|jpeg|png|gif)$ http://hpmouse.googlepages.com/hotlink.gif [NC,R,L]
    In between the () are images you intended to block from hotlinking. To add more seperate them with”|”

    Change ‘http://hpmouse.googlepages.com/hotlink.gif‘ to a image you’ve set, and whenever image hotlinking is detected, this image will show up. Just make sure where this image is not hotlink protected or your server can go into an endless loop.

  6. neha_joshi_rocks
    Member
    Posted 10 months ago #

    Here is my code.
    Have I done everything right?
    Coz it's not working.
    I am using other browser to test image links but no success :-(

    # BEGIN WordPress
    
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    
    RewriteCond %{HTTP_REFERER} !^$
    RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?hotmug.org [NC]
    RewriteRule \.(jpg|jpeg|png|gif)$ http://www.hotmug.org/wp-content/uploads/2013/10/hotlink.jpe [NC,R,L]
    </IfModule>
    
    # END WordPress
  7. Dave Naylor
    Member
    Posted 10 months ago #

    The image you're redirecting to ends like this:

    hotlink.jpe

    Is that right?

    Incidentally, I've hotlinked one of your images to test, if you check your logs, the alpha domain is me :)

  8. neha_joshi_rocks
    Member
    Posted 10 months ago #

    Yup it's hotlink with extension .jpe
    Do I have to change the extension of image?

    What I am doing wrong?
    Please tell me.

    PS: I don't have any idea what is alpha domain :-D
    Are you saying that it is working?

Reply

You must log in to post.

About this Topic