Using .htaccess to make all .html pages to run as .php files?
Create a .htaccess file at the root of your website and add this line:
[Apache2 @ Ubuntu/Debian: use this directive]
AddType application/x-httpd-php .html .htm
Or, from comment below:
AddType application/x-httpd-php5 .html .htm
If your are running PHP as CGI (probably not the case), you should write instead:
AddHandler application/x-httpd-php .html .htm
In My Godaddy Server the following code worked
Options +ExecCGI
AddType application/x-httpd-php .php .html
AddHandler x-httpd-php5 .php .html
This is in edition to all other right answers:
If you are not able to find the correct Handler, Simply create a .php file with the following contents:
<?php echo $_SERVER['REDIRECT_HANDLER']; ?>
and run/open this file in browser.
Use this output in .htaccess file
Create a .htaccess file at the root of your website(usually a folder named public_html or htdocs on linux servers) and add this line:
AddType [[THE OUTPUT FROM ABOVE FILE]] .html .htm
Example
AddType application/x-httpd-php70 .html .htm
Important Note:
If you see blank page or Notice: Undefined index: REDIRECT_HANDLER
Try default in .htaccess
AddHandler application/x-httpd-php .html