How to redirect users based on referrer site?

scottmso

Limp Gawd
Joined
Apr 15, 2004
Messages
380
I have a particular image on my website that is being linked to and embedded on many websites, when it could easily be hosted by these people themselves. In other words these people are stealing my bandwidth. I need to keep the image for my website and I don't want to do anything malicious (eg put up a "shock site" image).

How can I make it so that I can redirect these people to a page on my site (the page with the image) if the referrer is not my site? I've seen sites that do this before but I don't know how to. My webhost is DreamHost, if it matters. Any advice is greatly appreciated. Thanks!
 
My google search


To set up your hotlink protection:

1) Click on Goodies on the left of your panel.
2) Click on Htaccess/WebDAV.
3) Click on your domain
4) And then click Set up a new directory.
5) You will be taken to a page where you can edit your link protection. You would probably want to tick the box which has 'Forbid linking to files in this dir?'.
6) Confirm by clicking 'change these settings'.


(Your own pages will still display images in this folder)
 
Back
Top