Удалить последнее изменение и размер из mod_autoindex

Я работал над страницей хранилища файлов для своего веб-сайта и выяснил, как это сделать, используя mod_autoindex для моего сервера apache, и теперь я хочу удалить поле Last Modified and Size из таблицы.

Если бы это можно было сделать так или иначе, было бы здорово.

1 ответ

Решение

Я обнаружил, что путем введения JS в верхний / нижний колонтитул было бы легко удалить.

Вы можете использовать это в httpd.conf, чтобы удалить последний измененный заголовок в ответе.

Заголовок не установлен Last-Modified

This can actually be done using only Apache directives. I'm very late answering this question, but I'm leaving this for future reference. This works for Apache v2.0+.

The required directives are:

<IfModule mod_autoindex.c>
  IndexOptions FancyIndexing
  IndexOptions SuppressLastModified
  IndexOptions SuppressSize
</IfModule>

The most convenient location for these directives is likely to be the.htaccess file in the directory you wish to style.

Note: The FancyIndexing option is required to enable the two Suppress options. They won't work without it.

Official Apache IndexOptions Documentation

Другие вопросы по тегам