How to enable PHP for atypical extensions (htm, html)?

If you need to enable PHP for non-typical extensions (eg htm or html) you should add the following line to your .htaccess file: For a site with PHP in Apache module mode: AddHandler application/x-httpd-php .htm .html .php For a site with PHP in CGI mode: AddHandler application/x-httpd-php5 .htm .html .php