i cannot let my file listing prepend with a html file called header.html. below is my whole httpd.conf file.
#basic config
ServerRoot "D:/phpnow/Apache-22"
Listen 8888
ServerAdmin [email protected]
ServerName localhost
DocumentRoot "D:/"
Options Indexes
#dir_module
LoadModule dir_module modules/mod_dir.so
#<IfModule dir_module>
# DirectoryIndex index.html
#</IfModule>
#alias_module
LoadModule alias_module modules/mod_alias.so
#autoindex_module
#Alias /icons/ "D:/phpnow/Apache-22/icons/"
LoadModule autoindex_module modules/mod_autoindex.so
DefaultIcon /icons/unknown.gif
IndexOptions FancyIndexing
HeaderName /header.html
header.html is located at d:\header.html
content of the header is :
test
web browser output is :
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<html>
<head>
<title>Index of /</title>
</head>
<body>
<h1>Index of /</h1>
<pre> <a href="?C=N;O=D">Name</a> <a href="?C=M;O=A">Last modified</a> <a href="?C=S;O=A">Size</a> <a href="?C=D;O=A">Description</a><hr><img src="/icons/unknown.gif" alt="[DIR]"> <a href="$RECYCLE.BIN/">$RECYCLE.BIN/</a> 09-Jan-2011 17:59 -
<img src="/icons/unknown.gif" alt="[DIR]"> <a href="test/">test/</a> 26-Dec-2010 21:10 -
<hr></pre>
</body></html>
HeaderName
must resolve to a document with a major content type oftext/*
(e.g.,text/html
,text/plain
, etc.). On windows you need to haveAddType text/html .html
somewhere in your configuration.