Enable or disable LastModified column in apache mod_autoindex with fancyindex

66 Views Asked by At

I am using mod_autoindex to give access to a hierarchy of files with an apache server. In most folders including the root folder, I don't want to display the "Last Modified" column, so I added the following in the .htaccess file in the root folder:

IndexOptions FancyIndexing [...] SuppressLastmodified

The [...] stands for other options I omitted to avoid cluttering this post.

Further down in the folder hierarchy, there is a folder for which I want to display that column again.

I did not find any available option to revert for that folder the effect of SuppressLastModified.

I tried to put an .htaccess file in the subfolder with:

IndexOptions FancyIndexing LastModified

or

IndexOptions FancyIndexing +LastModified

Neither work, and the vim syntax highlighting did not recognize LastModified as a known keyword.

Does anyone have a recommendation on how to do that? Many thanks to all in advance.

1

There are 1 best solutions below

0
On

OK.

I found the answer. Just adding a new .htaccess file in the subfolder with the original top-level IndexOptions with the SuppressLastModified removed does the trick.

Top-level folder .htaccess file contains:

IndexOptions FancyIndexing VersionSort HTMLTable SuppressLastmodified

Subfolder .htaccess file contains just:

IndexOptions FancyIndexing VersionSort HTMLTable