0

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

1

2 Answers 2

0

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

<FilesMatch "\.php\.html$">
    SetHandler None
</FilesMatch>
1
  • Does not work for me, sorry. Apr 6, 2010 at 12:07
0

From the accepted answer of https://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>

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .