HeaderName in htaccess files

I’m having trouble trying to get my HeaderName directives working in an htaccess file.

Is there an actual list of the syntax that will work in a file? I’m kind of
sick of seeing the dreaded 500 errors.

If I leave the file blank and upload a file named HEADER.html, it works.
Great, that’s specified in the httpd.conf file that I can’t edit.

If I put any variables or a different path location in an htaccess file, I
always get a 500 error. Here’s some sample code:

IndexOptions FancyIndexing
HeaderName /files/head.html
ReadmeName /files/foot.html

The / should specify the files to the root of my domain, correct?

Has anyone sucessfully got this working? If so, what code did you use?

Even using the code specified in the KBase for DH lists

HeaderName header.html
ReadmeName readme.html

as working, yet it doesn’t. I can’t see how this would be specific to my case though.

Check here for the full KBase article: https://panel.dreamhost.com/kbase/index.cgi?area=3083

Well, here is the documentation where you can get the syntax for the run-time directives:


It works for me.

DocumentRoot /home/user/example.com

Options +Indexes
IndexOptions +FancyIndexing
HeaderName /files/head.html
ReadmeName /files/foot.html[/code]Given that /home/user/example.com/files/head.html and /home/user/example.com/foot.html exist.

When you get a 500 error from Apache, there should be a line in the error.log file

:cool: Perl / MySQL / HTML+CSS

The error.log isn’t a whole lot of help, at least on the first one…

[Fri Jul 15 06:39:53 2005] [alert] [client xx.xx.xx.xx] /home/user/example.com/files/testing/.htaccess: Illegal option IndexOptions
[Fri Jul 15 06:39:53 2005] [alert] [client xx.xx.xx.xx] /home/user/example.com/files/testing/.htaccess: <VirtualHost not allowed here

I wonder why it isn’t taking? I’ve gone through the apache docs, but I can’t get any combination to work, other than just putting a file in each directory called HEADER.html. I would like to get it to work on several directories, including ones made by other users, so manually putting a file in each folder isn’t an option.

ignore the virtualhost line, i know that doesn’t go in the .htaccess file itself…

Anymore help on this? I’ve worked on it over the weekend to no avail.
It seems that I can’t get it to work on Apache 1.3.x servers. It works
fine on a 2.x sever that I have at home to test with.

/home/user/example.com/files/testing/.htaccess: Illegal option IndexOptionsThought you would have seen it by now.

IndexOptions is not an option, its a directive.

[code]## CORRECT

use + to avoid changing other options

IndexOptions +FancyIndexing


causes Illegal option error

Options IndexOptions[/code]See IndexOptions directive

:cool: Perl / MySQL / HTML+CSS

That’s my point…
I can use something like IndexOptions +FancyIndexing
and it still gives me the error.

If adding the IndexOptions directive itself causes an error, then contact support, and see if they somehow changed the AllowOverride directive to not allow it.

:cool: Perl / MySQL / HTML+CSS