Preventing Windows Server Hotlinking

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View


I am trying to block people from hotlinking images directly from my
website. This is hosted on a Windows Server and I do not have access to

Does anyone know ways other than .htaccess that I can use to prevent
hotlinking? Perhaps using ASP?

Thanks in advance,

Re: Preventing Windows Server Hotlinking

Writing in news:alt.www.webmaster
 From the safety of the cafeteria

Quoted text here. Click to load it

How do you do?

Quoted text here. Click to load it

Aha - how incredibly topical.  Goes ages without this discussion then  
several come along at once.

Quoted text here. Click to load it

ok - IIS5 or 6?  Is [dot]net installed?

Quoted text here. Click to load it

That's a bit of a bugger.  Is the host flexible?

Quoted text here. Click to load it

Yes - which ASP languages are available?

Start by placing the images somewhere out of reach - your host probably  
provides a data directory.

In any language, you simply replace the src attribute with a call to a  
script.  In the script you query the referrer, ther will be 3 values ...
o Your site - deliver the requested image
o another site - deliver the alternative image
o no referrer - your choice.  some folk deliver the original image with  
the url drawn across it.

Implementation details vary by language.

Better solutions are available if you can get your host to add a [dot]net  
handler to your site but the decision logic is identical.

William Tasso

** Business as usual

Site Timeline