Htaccess rule for php analysis in html files not working

can't work for me why it doesn't work - on the dreamhost server I created a htaccess file and added AddHandler php5-cgi .html .htmit to allow php in html files according to dreamhost docs. On the identical dreamhost package, I did the same for another site, and it worked fine, but in this case it just won’t parse php! Is there anything I could skip here that might cause the problem? Htaccess is located in the root directory and is not overridden by anything else.

+3
source share
4 answers

Is your server used with suPHP and not mod_php or simple php-cgi?

AddHandler x-httpd-php .html .htm

AddType application/x-httpd-php .html .htm

.

Postscript

UID . suPHP, suEXEC. . su php-cgi, phpinfo() PHP- , Server API CGI/FastCGI. , CGI, phpinfo Apache. -, :

 <?php
 header( "Content-Type: text/plain");
 echo system('grep -iR LoadModule /etc/httpd /etc/apache2');

/- . ?

+4

  AddType application/x-httpd-php .html .htm

, apache php .

 AddHandler application/x-httpd-php .html .htm

 AddHandler application/x-httpd-php5 .html .htm

, apache php CGI?

, , , , .

+8

, , AddType php .html .htm .htaccess, .

+1

:

AddHandler php-cgi .php .htm
0

All Articles