Mod_header & PHP


#1

I was wondering whether anyone would have a suggestion to a little dilemma I’m having: I want to add a custom HTTP response header to a few of my domains. Fortunately it looks like Dreamhost has mod_header installed, so I go ahead and add the usual “header set this that” stuff in the .htaccess file. Everything is fine… as long as the index page for the domain is index.html. If I use index.php instead, the custom header is never sent.

I’m running PHP5 as CGI.

Would anyone have any ideas on how to go about making it so that the custom header works with PHP files?

I have a vague theory about the cause of this, though I’m not at all sure about it: I think PHP gets invoked before mod_header, and that’s why the custom headers are ignored. If that’s the case the solution would be to edit httpd.conf file … but that’d be something DH would have to do. And that might not be the problem at all … any ideas?