I think there is no answer to this question, but ideally I would like to be able to allow hotlinking of images, but redirect regular links. For example, if someone uses this, it should work as expected:
<img src='http://mysite.com/image.jpg'/>
But if they use this, it will be redirected to another page when visiting:
<a href='http://mysite.com/image.jpg'>Click Here</a>
I believe $HTTP_REFERER
is the same, regardless of two methods. Is there any other smart way to distinguish these two?
source share