ForceType producing 500 Error on Apache 1.3

pr0gr4mm3r's picture

He has: 1,502 posts

Joined: Sep 2006

I am trying to setup a clean URL navigation, but I am having some trouble with internal server errors. I am basically trying to force the php type on a file called 'content', so I can have files such as mysite.com/content/blah/344. Anyways, this is what I was told to add to the .htaccess file:

<FilesMatch "^content$">
    ForceType application/x-httpd-php
</FilesMatch>
'

and this is the content file in the same directory:

<?php
    header
('Content-type: text/html');
    echo
'It works!!';
?>
'

I want it to work on my main server, but it doesn't. My main server is running cPanel with php4 and Apache 1.3. This technique does work on my home webserver running php5 and Apache2, and it does work on my shared hosting account running php4 and Apache 1.3. When I get the internal server error, I look in the error log and see that the error says "Premature end of script headers."

Any ideas? Thanks.