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
</IfModule>
link|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
feedback

2 Answers

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.

link|improve this answer
feedback

adding

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

AFTER

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

worked -.-'''

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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