pic redirect

Is it possible to redirect people to image.php whenever they try to access images in the album directly? And let them access the full pic only if they pass through image.php first.

The reason is that I like to see how many hits each image gets, too bad I have a few people linking to the full uri instead (.../albums/album_name/image.jpg) and with this method all the hits get lost.

Btw, what is Full image protection supposed to do? Cause I thought that was the solution to my problem, I set it to protected, checked 'disable hotlinking' but the images are still directly accessible.

Comments

  • Disable hotlinking is supposed to do what you want.

    The code uses `$_SERVER['HTTP_REFERER']` in its testing. A quick check on this in the PHP docs reviels the following:
    "The address of the page (if any) which referred the user agent to the current page. This is set by the user agent. Not all user agents will set this, and some provide the ability to modify HTTP_REFERER as a feature. In short, it cannot really be trusted."

    So maybe this does not always work.
  • On my site, it seems that the full image uri (...?p=*full-image) cannot be hotlinked, whereas the cached image can be.

    At any rate, I personally just wrote an .htaccess file in my albums directory to disable all access.
  • Thanks for the reply. I disabled access to album folders as explained here and it works.
    http://www.zenphoto.org/support/topic.php?id=2223#post-29471
    It only blocks instead of redirecting but that's one step further. So there's really no other way to redirect people from the cached image except disable hotlinking?
  • http://www.zenphoto.org/support/topic.php?id=1354#post-7787
    Found this. Does anyone know how to make it work with the current version?
Sign In or Register to comment.