Eliminate the display of Last Modified date and file Size in mod_autoindex

Recently, while developing a file storage webpage for my website, I successfully implemented mod_autoindex for my Apache server. However, I now face the challenge of removing the Last Modified and Size fields from the table.

I am hopeful that there is a way or method to achieve this. Any suggestions would be greatly appreciated.

Answer №1

After some investigation, I discovered that injecting JavaScript into the header/footer is a simple way to remove it.

Answer №2

This solution utilizes Apache directives exclusively for achieving the desired result. Although my response to this question is belated, I am leaving this information here for future reference. These directives are applicable for Apache v2.0 and above.

The following directives are necessary:

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

The optimal placement for these directives would likely be in the .htaccess file within the targeted directory.

Important Note: The FancyIndexing option is crucial for activating the two Suppress options. Without it, they will not function as intended.

Access Official Apache IndexOptions Documentation Here

Answer №3

If you're looking to eliminate the last modified header from your response, simply add the following code snippet to your httpd.conf file:

Header unset Last-Modified

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Text centered on hover for figure caption

Check out this fiddle http://jsfiddle.net/sLdhsbou/ where I am trying to center the "x" that appears on hover perfectly no matter what size the image is. Also, why does the transition not occur when moving the mouse outside of the figure, unlike when movi ...

Incorporate a local asciinema file into an HTML document

Is there a way to embed a local asciinema session into an html file? Here is how my directory is structured: $ tree . ├── asciinema │ └── demo.cast ├── css │ └── asciinema-player.css ├── index.html ├── js │ ...

The JSP page is unable to locate or access relative resources such as CSS stylesheets and images

I'm struggling to create a basic web page using JSP. The issue I'm facing is that no resources, such as images or CSS, are being found regardless of the URL I use. Here is my simple JSP code: <%@ page language="java" contentType="text/html; ...

Enhancing the appearance of an image upon hovering in ReactJS: A step-by-step guide

My issue arises from my desire to border an image and display a Card with information upon hovering, but the problem is that this style is being applied to all images rather than just the one being hovered over. After pulling data from a movie API, I stor ...

When items are set to full width, material ui grid alignItems flex-start only affects the first row

I'm currently working with the material ui grid system, and I have a specific requirement. I need to create a grid container with a fixed height of 200px that accommodates full-width items. The challenge here is that I want the items to fill the conta ...

The MySQL Query Maker

To fetch data from a database for only one row and then generate separate pieces of information, use the following code: <?php session_start(); ob_start(); error_reporting(E_ERROR | E_WARNING | E_PARSE); ini_set("display_errors", 1); set_time_limit(1 ...

In what ways can CSS be used to create a smoother edge effect on images?

After attempting to add an image to my website, I noticed that its edges appear quite rough. https://i.sstatic.net/Xol9R.png(Note: In the image above, you can observe the jagged surface around the berry). This issue arose when I eliminated the background ...

I require a way to decelerate the speed of the roulette wheel's rotation

For my assignment, I'm tasked with creating a roulette spin wheel code in JavaScript without using any plugins. I need to incorporate some conditions before executing the code, particularly for slowing down the speed of the roulette spin. Additionally ...

Steps to utilize a PHP include for displaying HTML content corresponding to the URL file name

I am currently working on a PHP script that utilizes PHP include to insert HTML content based on the filename from the URL. For instance, with the use of PHP include: - if the filename in the URL is dog.html, it will display dog within the HTML document. ...

Styling the scroll bar within a fixed parent container's inner div with CSS

Check out the JSBIN link here: JSBIN The modules container has a fixed height of 100%. I am attempting to make the list items scroll while keeping the search div fixed within the wrapper container, ensuring that the search bar remains visible at all times ...

What could be causing the discrepancy in results between the first and second methods?

Implementing Weather Icons: const getWeatherIcon = (iconParameter) => { const icon = `https://openweathermap.org/img/wn/${iconParameter}@2x.png` return <img src={icon} alt={iconParameter} /> } <div className="weathericon"> ...

What is the best way to adjust the size of an SVG image using the :before pseudo-class?

Is there a way to display an image in a CSS :before element? .withimage:before { content: url(path/to/image.svg); display: block; height: 20px; width: 20px; } I'm facing an issue where the height and width properties are applied to the eleme ...

What is the most effective way to send an email in PHP with a table format

<?php $result = mysqli_query($con, "SELECT * FROM cse"); $mail_data = ""; while ($row = mysqli_fetch_array($result)) { $Hallticket_No = $row['Hallticket No']; $Name = $row['Name']; $Email_ID = $row[&apos ...

Having trouble getting custom select to work with CSS in Firefox?

I want to customize the button (down arrow) located in the right corner of the select box. The HTML code is as follows: <div class="buscaSelect"> <select name="oper"> <option value="value1">Value 1</option> < ...

Is it possible for a user to change the data stored in sessionStorage variables?

Incorporating client-side JavaScript into my project to save certain variables using Web Storage - specifically, the sessionStorage. However, uncertainty exists regarding whether a user holds the capability to alter these variable values. If this is indee ...

AJAX: Bringing in new content to display beneath the triggering page

Here is the code for my main page: <head> <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script> <style type="text/css"> div { width:100%; ...

Conceal/reveal div with initial partial visibility

http://jsfiddle.net/7RDBk/1/ At the moment, I am using slideUp and slideDown functions to hide and display a div. My goal is to have 25px of the div showing initially before expanding and going back to 25px when clicked. It seems like a simple task, but I ...

Developing a custom styling class using JavaScript

Looking to create a custom style class within JavaScript tags. The class would look something like this: #file-ok { background-image: url(<?php echo json.get('filename'); ?>); } Essentially, the value returned from the PHP file (json ...

What is the method for updating the content within a div element?

I am trying to add multiple elements to my content, including an h1 element, an input field, and some buttons. I have written a function to create the h1 and input elements, but when trying to add them to my content div, I encountered an error (TypeError ...

How can I make CSS text-overflow ellipsis trigger a pop-up to display lengthy text when clicked?

I'm encountering an issue with a lengthy sentence in a table cell which I've truncated using text-overflow to display ellipsis. Is there a way to enable users to click on the dots (...) and view the full text in a popup window? table { wi ...