Forum Moderators: phranque

Message Too Old, No Replies

hotlinking for dummys

hotlinking

         

lcampers

12:44 am on Nov 9, 2005 (gmt 0)

10+ Year Member



So could someone post a step by step way in which you can stop people from hotlinking your images?

I am getting way too much traffic, especially from random forums (!) where posters just put up an image from my site. The worst part is when someone replies to that post, the image is posted again (usually on another page!).

It's pretty fun changing the picture, especially on high traffic sites, but it's getting too frequent to be that much fun anymore.

Can you spell out what I need to do (and I am a web - dummy )... i have ftp access to my site.

Thanks in advance!

-LAN

physics

6:10 am on Nov 9, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi lcampers. Yeah that can get annoying. This post should help:
Hotlink Protection Tutorial [webmasterworld.com]
See the 5th post on.

lcampers

3:47 pm on Nov 9, 2005 (gmt 0)

10+ Year Member



thanks... but i'm still a little confused

do i just put the following into a notepad and save it as htaccess in my root directory and that's all i need?

thank you!

"Proper ‘403 forbidden’ method

This method is my favorite because it is the easiest on the server and no bandwidth is used at all. Once again, there are several methods to just return ‘nothing’ but generating a 403 error for the hotlinker is perhaps the best. It will not cause any errors or confusion on your server, and the hotlinker will be left with a broken image link.

RewriteEngine on
RewriteCond %{http_referer}!^$
RewriteCond %{http_referer}!^http://(www.)?yoursite.com [NC]
rewriterule .(gif¦jpe?g)$ - [NC,F]

Just like before, you must change yoursite.com to match your domain name. You can also adjust the extensions in the last line if you wish. You do not have to worry about creating a replacement image to send though since we are just bouncing back a 403 error message. "

physics

4:00 pm on Nov 9, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Are you on a Linux machine running Apache?
If so you need to save the file with Linux-style newlines with an editor like Edit Plus [editplus.com]
Before saving the file go to File->Format->Unix in the Edit Plus menu.
The name has to be .htaccess ... note the leading period ... it won't work without that.
Once all that is done yes you can just FTP it to your /home/you/public_html/ directory.

lcampers

10:04 pm on Nov 10, 2005 (gmt 0)

10+ Year Member



um, i'm not sure what that means (you can see i don't know anything...)

i use dreamweaver and an ftp program and a dell computer, that's about all i know!

thanks again!

( i did win a BASIC programming competition in 8th grade in the 80s though )

Automan Empire

12:11 am on Nov 11, 2005 (gmt 0)

10+ Year Member



Try looking in your Admin control panel. My host has a hotlink protector built in. So far, though, I have had more problems linking to my own images that I want to hotlink elsewhere, than I have with others hotlinking. You can allow sites individually but I haven't gotten that far.

DaveLite

6:52 am on Nov 11, 2005 (gmt 0)

10+ Year Member



I also use the hotlinking protection from my Cpanel.

I create a page that is delivered to the users window instead of the graphic. I have the option to allow any site I want to hot link my graphics by adding the domain to a list.

It was pretty straight forward and so far works like a charm.