I am using an index listing via apache to stream my music and videos to a Roku device. I have a script that sets up the index directory structure and I want to use descriptions in .htaccess to sort the directories alphbetically. That way I can remove words like “the” in the description without actually renaming the directory and have it sorted correctly. I can use mod_autoindex directive of AddDescription easily enough, but that matches too broadly and I can’t seem to get to match one directory without matching others.
For example, I am trying to use it sort my music by artist so I add descriptions in an .htaccess for all of the artists, like
IndexOrderDefault Ascending Description
AddDescription “Queen” “/Queen"
AddDescription “Queensryche” "/Queensryche”
The first statement matches Queen, Queensryche, etc and the second gets ignored since the first one partially matches the directory name. I have tried using <Directory>, <DirectoryMatch>, <Location>, and <LocationMatch> but I am apparently doing something wrong as these seem to break my .htaccess completely.