Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm using mod_php on apache2 why are .php.html pages served as php ? This breaks the phpdoc output (I have shorttags on and I will keep them on so it parses <?xml ver[...]?> as PHP)

How do I force .php.html pages to be served as HTML ?

I have

AddHandler application/x-httpd-php .php .php3 .php4 .php5

and in mod conf

<IfModule mod_php5.c>
AddType application/x-httpd-php .php .php3
AddType application/x-httpd-php-source .phps
share|improve this question
Interesting, I just tried this here and with my setup, fcgid returns a 500 error and logs "communication error" when I create a file named foo.php.html and try to access it (with or without a foo.php file). – DerfK Mar 1 '11 at 20:19
up vote 2 down vote accepted

Redhat have know about this issue for a while. Check this bug post on the issue.

Basically they don't consider it a bug, and from a security point of view they expect the application to handle vetting files.

share|improve this answer


AddHandler text/html .php.html .html
AddType text/html .php.html .html


AddHandler application/x-httpd-php .php .php3 .php4 .php5

worked -.-'''

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.