#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2012
    Posts
    2
    Rep Power
    0

    Setting Descriptions on Directories for AutoIndex


    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

    Code:
    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.
  2. #2
  3. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2012
    Posts
    2
    Rep Power
    0
    I didn't find the answer to this question, but I scripted around the problem by moving the more restrictive match higher in the list. There were only a few that caused an issue it not that big of a deal. That made this work, but I would still be interestd to know if you can restrict AddDescription to single directory name.

IMN logo majestic logo threadwatch logo seochat tools logo