-1

I have an Apache server that has multiple files located on it. Each file is an updated version from the previous file. Eg. release-2013-07-20 is an older file and release-2013-07-25 is the newer file.

I am looking to query the apache server and have an display of the most updated file via website link.

I am unsure how to go about accomplishing this and I am looking for some suggestions.

Thank you, Tyler

Tyler
  • 1

1 Answers1

1

If you are using mod_autoindex and an apache version of 2.0.23 or greater, you can add ?C=M to your url and it will sort by last modified date and then by file name (provided IndexOptions IgnoreClient has not been set). Provided your latest file is the last file uploaded/updated this should solve your issue.

If you have a number of files in a directory and just want to display the latest then I'd agree with Zoredache - you'd need to develop a script to present that, or symlink the latest file:

ln -s release-2013-07-25 latest-release

and provide 'latest-release' as the link to the latest file.

Drav Sloan
  • 581
  • 4
  • 4