0

How do I do that?
I have a few pictures and avatars I made for my friends, but I don't want them to use the images without permission. How do I protect my images?

2
Contributors
2
Replies
3
Views
5 Years
Discussion Span
Last Post by TheChosen0ne
2

Most hosting services offer hotlink protection. Otherwise you need access to your document root .htaccess file

RewriteEngine on

RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://yoursite/.*$      [NC]
RewriteCond %{HTTP_REFERER} !^http://yoursite$      [NC]
RewriteCond %{HTTP_REFERER} !^http://www.yoursite/.*$      [NC]
RewriteCond %{HTTP_REFERER} !^http://www.yoursite$      [NC]
RewriteRule .*\.(jpg|jpeg|gif|png|bmp)$ - [F,NC]

This is from one of my sites with hotlinking protection turned on. Needless to say, replace 'yoursite' with the url of your site.

What it does is prevent any site other than yours to access the image files.

There are other codes that can be added but this is a basic one.

Votes + Comments
GENIUS!
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.