Link to home
Start Free TrialLog in
Avatar of happymacandpc
happymacandpc

asked on

redirecting hotlinked image in IIS and Cold Fusion

We have a small number of jpg files that are being hotlinked massively and resulting in a ton of traffic stealing.  Instead of blocking the traffic from these hotlinkers, we want to redirect the users requesting the jpg to an htm page.  Basically we want to let them see the picture but throw some content around it.  SO ... we want to achieve two items ...
1) We want other websites that have an img from our site embedded in their code, that the image will now have different information around it, instead of just a picture it will show some content as well as the picture.
2) If the other website (that is hotlinking) has a clickable link to one of our jpegs, we want it to automatically redirect to a real webpage instead of just displaying the jpg in a blank white page.

if someone has hotlinked the following picture:
http://www.hollywoodjesus.com/movie/ladder_49/01.jpg

we want it to redirect to some 'real' webpage like:
http://www.hollywoodjesus.com/includes/imageDetail.cfm?movie_id=ladder_49&picName=01.jpg&site_id=2

I figure there have got to be some software to get this working OR some custom code / dlls, isapi filter that help this process.

We are using a dedicated server (windows 2003) running IIS 6.0 and ColdFusion MX 7.

Thank you in advance,
Randy
ASKER CERTIFIED SOLUTION
Avatar of b0lsc0tt
b0lsc0tt
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
while this isn't a redirect, you can secure your images easily using CF.

place your images in a non-web accessible folder

then use cfcontent

<cfcontent file="C:\someDirectory\MyImage.jpg" type="image/jpeg">

now the only way to load this file from the Web is to load the page with cfcontent. No more hotlinking

Avatar of happymacandpc
happymacandpc

ASKER

Roonaan thanks for the information.  We are using IIS and the pages are ColdFusion.

Please confirm that i am understanding your post correctly ...
1) It sounds like for the actual  embedded images that are on the hotlinked website, there is no way to have an ad replace that picture UNLESS we literally replace the actual picture in our website's directory with a different pic that says something like "stop hotlinking my pic".   Because like you said, since they are using an img tag, there is no client side OR server side code we can write to have that image actually act as a clickable url.  Is that correct??
2) If on the hotlinked website, they have an actual clickable url to OURjpg, what you are saying is that there is a way to write some server side code that would redirect the jpg request to the url that we want.  Am I right here??
Forced accept.

Computer101
EE Admin