Apache hides directories with .htaccess file

Placing .htaccess file to the directory will hide it from the parent directory index. Simply said, directory with .htaccess file will be hidden by default in Apache 2.2 and later. To display directories with .htaccess file, document root (or subtree) should have set ShowForbidden index option. ShowForbidden is a new option in Apache 2.2 and it’s not set by default.

Styling Apache directory listings

In this post you will find how to make stylish listing generated by the Apache server. This is not just another CSS solution. The trick is in configuring Apache to generate XML directory list and to use browser (IE, FF, Opera, Safari …) to transform XML to the HTML. You will have full freedom to modify and style auto generated directory listings.

Create XML from directory list with Apache

In Apache world, the index of a directory can come from one of two sources – a file written by the user, typically called index.html or a listing generated by the server. If you enable automatic index generation (with Options +Indexes), Apache will create a HTML directory list for the URL without index page. With a few lines in httpd.conf, directory list can become a XML document.