I have a download directory with different versions of the same file, plus a "latest" that is a symlink to the most recent version, like this:
foo-1.0.tar.gz
foo-1.1.tar.gz
foo-2.0.tar.gz
foo-latest.tar.gz -> foo-2.0.tar.gz
I'd like to point my users to download http://example.com/.../foo-latest.tar.gz, but when I do this, browsers will save the file as foo-latest.tar.gz, so the user doesn't actually know which version they downloaded. Instead, I'd like the browser to save it as foo-2.0.tar.gz.
I understand that the HTTP Content-Disposition header can be used for that. Is there a way to configure Apache so it sends that header with the target of the symlink as the filename, without me having to write a custom download script?
0 Answers