First of all, you have to determine if your server is using FastCGI or Fcgid, because the configurations differ between them.
Under fastcgi
As long as .htacces is allowed to override FileInfo settings (AllowOverride +FileInfo or AllowOverride All), you can force files with .ext1 [.ext2 [...]] extensions to be run as a php script with:
Code:
# Enable php for another extension
AddHandler php-fastcgi .ext1 .ext2
Similarly, you can...
Code:
# Disable php in this folder and it's childs (unles re-enabled by another .htaccess)
RemoveHandler .php .php5
Under fcgid
You're out of luck, as the default configuration doesn't allow you to do this (at least I've been unable to). Now, I enabled this possibility by following these steps:
1. Replace the "<IfModule mod_fcgid.c>....</IfModule>" block from the files /etc/ispcp/apache2/parts/{als,dmn,sub}_php2_entry.tpl by the following one:
Code:
<IfModule mod_fcgid.c>
Alias /fcgi/ {STARTER_DIR}/{DMN_NAME}/
<Directory "{STARTER_DIR}/{DMN_NAME}/">
AllowOverride None
SetHandler fcgid-script
Options +ExecCGI
</Directory>
AddHandler php{PHP_VERSION}-script .php .php{PHP_VERSION}
Action php{PHP_VERSION}-script /fcgi/php{PHP_VERSION}-fcgi-starter
AddType application/x-httpd-php .php
</IfModule>
2. Regenerate domain configurations and restart apache.
3. Insert the following in your .htaccess:
Code:
# Enable php for html-files
AddHandler php5-script .htm .html
Similarly, you can...
Code:
# Disable php in this folder and it's childs (unles re-enabled by another .htaccess)
RemoveHandler .php .php5
Using mod_rewrite
Obviously, you can also try to use mod_rewrite instead:
Code:
RewriteEngine On
RewriteRule ^(.*).html?$ $1.php [L]
And then rename all your files to .php instead of .htm(l)...
Hope this helped.