rvacs Posted June 2, 2003 Share Posted June 2, 2003 Hello All, Sorry I have almost no knowledge of Apache but had a question. If your url has no index.html in that directory it shows a listing of files in that directory - GREAT - this is what I want. BUT Are there any scripts or values that allows me the ability to sort the file listing? Basically I would like to alphabetize or sort by type. Any suggestions of what I should look at??? Thanks SO MUCH, Rich Quote Link to comment Share on other sites More sharing options...
holiks Posted June 3, 2003 Share Posted June 3, 2003 u can already sort ....by Name, Last Modified, Size and even Description...with apache Quote Link to comment Share on other sites More sharing options...
Nevets Posted June 12, 2003 Share Posted June 12, 2003 From... http://httpd.apache.org/docs/mod/mod_autoindex.html Autoindex Request Query Arguments The column sorting headers themselves are self-referencing hyperlinks that add the sort query options to reorder the directory listing. The query options are of the form X=Y, where X is one of N (file Name), M (file last Modified date), S (file Size, or D (file Description), and Y is one of A (Ascending) or D (Descending). When options other than the file name are used as the sorting key, the secondary key is always the file name. (When the file name is used to sort by, there is no need of a secondary sort key, since file names are guaranteed to be unique, and so the sort order is unambiguous.) Example: If the URL http://your.server.name/foo/ produces a directory index, then the following URLs will produce different sort orders: http://your.server.name/foo/?M=D sorts the directory by last modified date, descending. http://your.server.name/foo/?D=A sorts the directory by file description, ascending. http://your.server.name/foo/?S=A sorts the directory by file size, ascending. See IndexOrderDefault to set the default directory ordering. Note also that when the directory listing is ordered in one direction (ascending or descending) by a particular column, the link at the top of that column then reverses, to allow sorting in the opposite direction by that same column. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.