Apache don't the HEADER file and README file...

Apache don't the HEADER file and README file...

Post by Carfield Yi » Sat, 13 Jan 2001 03:27:22



I have write the file HEADER and README, and put it the the directory I
want to display, but apache just ignore these file, is there any special
thing need to set so that HEADER and README is enable?
 
 
 

Apache don't the HEADER file and README file...

Post by David Efflan » Sat, 13 Jan 2001 04:31:08



>I have write the file HEADER and README, and put it the the directory I
>want to display, but apache just ignore these file, is there any special
>thing need to set so that HEADER and README is enable?

That only works if Options Indexes are enabled and you do not have any
index.html or other file in your DirectoryIndex list.  Contents of the
file you specify as HeaderName will appear before the directory listing
and ReadmeName will appear after (like a footer).

A assume you reviewed docs for HeaderName and ReadmeName.  However, the
docs may be confusing.  I thought 'HeaderName HEADER' would look for
HEADER.html or HEADER only in 1.2 or earlier, but my docs say it still
does that for 1.3.  However, I think that may be inaccurate.  For 1.3 I
think you have to specify the actual filename, so if you want to use
HEADER.html, you have to specify 'HeaderName HEADER.html' (or at least I
had to do that on my ISP when apache was upgraded to 1.3).

However, now that one of my sites moved to 1.3.12, 'HeaderName HEADER'
does not display HEADER.html at all and 'HeaderName HEADER.html' displays
HEADER.html as text/plain, so now I am confused.  I guess I need to dig
deeper into the server config.

--

http://www.autox.chicago.il.us/  http://www.berniesfloral.net/
http://cgi-help.virtualave.net/  http://hammer.prohosting.com/~cgi-wiz/

 
 
 

Apache don't the HEADER file and README file...

Post by David Efflan » Sat, 13 Jan 2001 10:40:52




>>I have write the file HEADER and README, and put it the the directory I
>>want to display, but apache just ignore these file, is there any special
>>thing need to set so that HEADER and README is enable?

>That only works if Options Indexes are enabled and you do not have any
>index.html or other file in your DirectoryIndex list.  Contents of the
>file you specify as HeaderName will appear before the directory listing
>and ReadmeName will appear after (like a footer).

>A assume you reviewed docs for HeaderName and ReadmeName.  However, the
>docs may be confusing.  I thought 'HeaderName HEADER' would look for
>HEADER.html or HEADER only in 1.2 or earlier, but my docs say it still
>does that for 1.3.  However, I think that may be inaccurate.  For 1.3 I
>think you have to specify the actual filename, so if you want to use
>HEADER.html, you have to specify 'HeaderName HEADER.html' (or at least I
>had to do that on my ISP when apache was upgraded to 1.3).

>However, now that one of my sites moved to 1.3.12, 'HeaderName HEADER'
>does not display HEADER.html at all and 'HeaderName HEADER.html' displays
>HEADER.html as text/plain, so now I am confused.  I guess I need to dig
>deeper into the server config.

For some reason apache 1.3.12 puts <PRE> tags around a HEADER.html and
escapes all special characters in it, effectively making it plain text.  
In order to use html for this I had to do this in .htaccess:

HeaderName HEADER.html
ReadmeName README.html
AddType text/html .html

Using just plain HEADER for the HeaderName did nothing, even when there
was a text file called HEADER.  But a text file called HEADER.txt did work
when I used:  HeaderName HEADER.txt

I have no idea what other server configuration caused apache to not
recognize .html as html, unless it has something to do with MultiViews.

--

http://www.autox.chicago.il.us/  http://www.berniesfloral.net/
http://cgi-help.virtualave.net/  http://hammer.prohosting.com/~cgi-wiz/