What is AddType application/x-httpd-php-source

Posted by egor on Server Fault See other posts from Server Fault or by egor
Published on 2010-09-11T02:16:09Z Indexed on 2011/02/16 23:27 UTC
Read the original article Hit count: 317

Filed under:
|

I have the apache2.0, PHP5.2.4 and the directive in the httpd.conf:

AddType application/x-httpd-php-source .php .php3 .php4 .php5 .php6

AddType directive is used to maps the given filename extensions onto the specified content type. This is the only meaning of this directive. But why does this method switch off PHP handler, that assigned .php extensions, and I can view source code of scripts in my browser?

And another: AddType application/x-httpd-php5 .php

Why does this method switch on PHP handler? This simply must send header "Content-Type: application/x-httpd-php5" to my browser and this must be only meaning of directive AddType from mod_mime. I'm confused.

Thanks for your replies.

© Server Fault or respective owner

Related posts about apache

Related posts about php