on my Apache/PHP server, file test.php.html is parsed by PHP, while test.html is not. PHPDOC create a lot of *.php.html files, with a XML header wich is a pain for PHP parser, but how to tell Apache not to pass *.php.html file to PHP and just send back the file to browser?

My php.conf file

<IfModule prefork.c>
  LoadModule php5_module modules/libphp5.so
</IfModule>
<IfModule worker.c>
  LoadModule php5_module modules/libphp5-zts.so
</IfModule>
AddHandler php5-script .php
AddType text/html .php

What can I do?

Thanks,
Bests regards
Cédric

link|improve this question

There appears to be a similar question on stackoverflow that might help you: stackoverflow.com/questions/189780/… – Michael Apr 3 '10 at 18:45
Thanks you, the accepted answer work for me! – Cédric Girard Apr 6 '10 at 12:08
feedback

2 Answers

Add the following to your Apache configuration or in a ".htaccess" file:

<FilesMatch "\.php\.html$">
    SetHandler None
</FilesMatch>
link|improve this answer
Does not work for me, sorry. – Cédric Girard Apr 6 '10 at 12:07
feedback
up vote 0 down vote accepted

From the accepted answer of http://stackoverflow.com/questions/189780/why-is-apache-executing-php-html-files-as-php

I replaced

AddHandler php5-script .php

by

<FilesMatch \.cgi$>
SetHandler cgi-script
</FilesMatch>
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.