httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nick Kew <n...@webthing.com>
Subject Re: [users@httpd] test.html.php shown as html not as php
Date Mon, 28 Jan 2008 15:45:11 GMT
On Mon, 28 Jan 2008 16:21:16 +0100
Marten Lehmann <lehmann@cnm.de> wrote:

> Hello,
> 
> using apache 2.2.4 we have these lines in our httpd.conf (among
> others of course):
> 
> AddType application/x-httpd-php .php

That's wrong.  PHP is a handler, not a MIME type.  That ugly hack
was required by Apache 1.0, but has been a nasty bogosity since
Apache 1.1 in 1996.

> AddHandler server-parsed .html

And that's been wrong since Apache 2.0 in 2002, when SSI ceased to
be a content generator and became a filter.  The legacy support for
SSI handlers precludes using dynamic contents with SSI.

> HTTP/1.1 200 OK
> Date: Mon, 28 Jan 2008 15:07:32 GMT
> Server: Apache/2.2.8 (Unix) mod_ssl/2.2.8 OpenSSL/0.9.7a
> Accept-Ranges: bytes
> Content-Length: 31
> Connection: close
> Content-Type: application/x-httpd-php

That's exactly what you told it:
- the handler is "server-parsed", so php rightly doesn't touch it.
- the content-type is what you set.

-- 
Nick Kew

Application Development with Apache - the Apache Modules Book
http://www.apachetutor.org/

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message