Redirect to symlink target

Jeff Mitchell jeff at jefferai.org
Thu Dec 2 04:55:54 MSK 2010


I'd like to have a file at an easy URL:

http://myserver/myfiles-latest.tar.gz

but where myfiles-latest.tar.gz is, on disk, actually a symlink to a
uniquely identifiable version, something like myfiles-[sha1sum].tar.gz.

What I'd like is for a user that fetches myfiles-latest.tar.gz to be
redirected to the target of the symlink, so that they end up getting the
file myfiles-[sha1sum].tar.gz. In this way they could be sure that they
wouldn't accidentally resume downloading a changed tarball (since
If-Unmodified-Since appears to be unsupported).

Is there any way to do this?

Thanks,
Jeff



More information about the nginx mailing list