Custom PHP Processing – force .html/ .htm files to process as .php

In certain situations it may behoove one’s website to process .html and .htm files as .php files, causing the web server to treat the files as if they are .php files.

Add the following to your .htaccess file:

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

This will cause all files in the current directory that end in .html or .htm to be treated like PHP files. This only works for the directory in which the .htaccess file counting the code is in. To have this affect cascade site wide make sure it is in your ‘primary’ .htaccess file (that which is in the uppermost folder of your webfoot, public_html) and following the instructions here to cascade these rules throughout your site: http://kb.canvashost.com/?p=62