How to setup proper directory indexing in Apache.

Posted: January 25, 2018. At: 12:27 PM. This was 1 month ago. Post ID: 11783
Page permalink.
WordPress uses cookies, or tiny pieces of information stored on your computer, to verify who you are. There are cookies for logged in users and for commenters. These cookies expire two weeks after they are set.

To get proper directory indexing setup in a directory in your Apache web server configuration, firstly, create a .htaccess file and paste the code below into it.

Options +Indexes
HeaderName HEADER.html
ReadmeName FOOTER.html
IndexIgnore .htaccess .??* *~ *# HEADER* FOOTER* README* RCS CVS *,v *,t *.inc

Then create a HEADER.HTML with this in it.

<title>Misc Files.</title>
<h1>Misc files for download</h1>

And a FOOTER.html with this in it.


This is how the directory can use fancy file listings.

This is what I got when I implemented this on my website.

No comments have been made. Use this form to start the conversation :)

Leave a Reply