Welcome to Geeklog, Anonymous Tuesday, May 07 2024 @ 03:34 am EDT

Geeklog Forums

How to prevent stolen pictures?


tokyoahead

Anonymous
How can I prevent with apache that geeklog pictures are beeing linked directly from other pages?

In the best case I want to redirect direct links to pictures to the page where the pciture comes from...
 Quote

Status: offline

tomw

Forum User
Full Member
Registered: 08/12/02
Posts: 300
The easiest way is to simply ban the referer. If you want to go a little further then this article will help.

By the way people who leach pictures usually deny it even when confronted with the proof. Never understood this.
 Quote

tokyoahead

Anonymous
The problem is that I was linked from livejournal.com which was then in return copied, and I found one picture on about 20 different pages
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Did you read the article Tom pointed you to? It explains how you can send them a different picture instead of the one they were trying to link to.

bye, Dirk
 Quote

tokyoahead

Anonymous
Quote by Dirk: Did you read the article Tom pointed you to? It explains how you can send them a different picture instead of the one they were trying to link to.

bye, Dirk


yes, I have seen it. Though it is roughly where I want to go I rather have a re-direct to the actual story, in dependency of the file that is called. I know this is far more complex, but my page is mainly about pictures, and I dont want to manually do this for each of them.

When a site like Fazed.com or lifejournal.com had your picture, you might as well leave it as it is since its moving too fast for you to realize it in time. there have been a thousand hits and only costs for you.

when the author of the article sees that he cannot link to the picture in any case, I guess he will post a link to the article. if he does not want that, he stops.
 Quote

Status: offline

knuff

Forum User
Full Member
Registered: 12/17/04
Posts: 340
Location:Sweden
--------------------------------------------------------------------------------
Preventing hot linking of images
--------------------------------------------------------------------------------

In the webmaster community, "hot linking" is a curse phrase. Also known as "bandwidth stealing". It refers to linking directly to non-html objects not on one own's server, such as images, .js files etc. The victim's server in this case is robbed of bandwidth (and in turn money) as the violator enjoys showing content without having to pay for its deliverance. The most common practice of hot linking pertains to another site's images.

How can I prevent people from hotlinking to my images?

The best way to stop hot linking is to have your images placed in a seperate folder (not the same folder as your html files) and put a .htaccess file in it. Each folder should also have a blank index.html file to prevent people from seeing your directory listing.

In order for the method below to work, the browser that requests the page must return the URL of the page, called the "HTTP_REFERER". Checking the HTTP_REFERER will slow down the server somewhat so you should only do this if people hotlinking your images is a problem.

Copy this text below, make the changes to show your domain info, and paste it into notepad. Name this file .htaccess and place it in all your image folders. Be sure to upload in ASCII mode or the .htaccess file will not work.

Text Formatted Code
Options All
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www\.)?mydomain.com/.*$ [NC]
RewriteRule \.(gif|jpg)$ - [F]

 


Be sure to replace "mydomain.com" with your own. The above code causes a broken image to be displayed when its hot linked. You can have an image display for those who try to hot link. You can have an image of your choice be displayed for those attempting to steal bandwidth. The code for this is:

Text Formatted Code
Options All
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www\.)?mydomain.com/.*$ [NC]
RewriteRule \.(gif|jpg)$ http://www.mydomain.com/notallowed.gif [R,L]

 


The first line allows the "RewriteRule" directive to be used (only needed on some servers).
The next line tells Apache to turn on the MOD Rewite.
The next two lines you change to your address (either with, and without the www. as well as your IP).
The last line is where you would like the link from the site trying to download from their pages to be redirected. This way if some one links directly to your "coolpicture.jpg" from their website, instead of seeing your cool picture the user will see a picture that you decide to show. Make the picture be something the user will not want to see and get the message across that he is a bandwidth stealer. After the user sees that the "hot linking" isn't working, the user will change his links.

In order to have it work for you:

replace mydomain.com with your own domain
replace the notallowed.gif with the image you want them to see.



From the FAQ of my hosting provider: Tera-Byte
Vanrillaer.com - our Family Portal
 Quote

All times are EDT. The time is now 03:34 am.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content