httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Simon <>
Subject Re: [users@httpd] Content Negotiation and PHP
Date Wed, 13 Oct 2004 17:04:22 GMT
It strikes me that the AddType command is indeed what I should be using 
(with the .php extension) as 1&1 haven't got this in their config file - 
which is perfectly OK.  But the server is not returning the page as 
text/html, instead as application/x-httpd-php which obviously the 
browser doesn't understand and tries to dwnload it to disk instead.

So...internally Apache needs to know the source is 
application/x-httpd-php so that it can send it to the PHP parser for 
processing, but the resulting file needs to come to the browser as 
text.html.  Where is the missing link??  What tells Apache/PHP to retrn 
files as HTML?

All I've got is the following command:

AddType application/x-httpd-php .php

Does this tell Apache internally that the file is PHP, or does it tell 
Apache to return the page to the browser as PHP, not HTML?  Or does it 
do both, and can I add another command to change the MIME type of the 
resulting file to HTML?

Chris Simon

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message