distinguish hotlinking and direct links of images
===

Is there any way to distinguish direct image hits from hotlinked images?

What I'm trying to accomplish is:

If user directly goes to "page.com/image17.gif" he should be redirected to "page.com/page17.html"

If someone embeds an image on another page, he should see "notHotlink.jpg"

My website and search engines should be unaffected so their indexing still works for image searches