php.htaccessindexingindexofdirectory-listing

Is it possible to use .htaccess to make custom Index Of pages? If so how?


You know how when you go to a url on a server and the directory doesn't have an index.* file or a default.* file it shows you a list of the directorie's contents? I was wondering if there is any way to customize the way that index looks or theme it to fit your site. For instance I'd want to add the php

<?
include 'template.php';

head();
?>

Before the listing. And

<?php
foot();
?>

After. Can this be done?


Solution

  • I have never done this before, but this shows how to do it: http://www.webmasterworld.com/apache/3589651.htm via .htaccess.

    Edit: Maybe this (snapshot) shows exactly what you want, it's a walk-through of how to embed header and footer in the listing page.