To allow Apache web server, to process files ending with .html as php files, we need to do two things. First we need to set the content-type http header for .html files to text/html. Secondly, we need to tell the Apache web server to process html files as php files.
Usually this can be achieved by adding following two lines in .htaccess:
The above code should work if Php is configured as an Apache module, but may not work for other configurations like FastCGI.
AddHandler application/x-httpd-php .html AddType text/html .html
To allow Apache to server files ending with .html as php files, we need following code in vhost.conf file for the required virtual host:
The above code is for FastCGI configuration. It will differ for other configurations like mod_php. After editing the file we need to run following command for re-configuring the web server: /usr/local/psa/admin/sbin/httpdmng --reconfigure-all.
<IfModule mod_fcgid.c> <Files tilde (\.html)> SetHandler fcgid-script FCGIWrapper /var/www/cgi-bin/cgi_wrapper/cgi_wrapper .html Options +ExecCGI allow from all </Files> </IfModule>