Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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>
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

2 Answers 2

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

adding

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

AFTER

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

worked -.-'''

share|improve this answer

Your Answer

 
discard

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.