Parsing HTML files as PHP

Is this the correct way to parse html files as php?

RemoveHandler .html .htm
AddType application/x-httpd-php .php .htm .html

Saved in a .htaccess file in my root folder?

I am adding in a navigation bar that is called in via php and this would save renaming all my html files!

Thanks


RewriteEngine on 
RewriteRule ^(.*)\.htm $1\.php

Yes, if your webserver is running php as Apache module.

If your webserver is running PHP as CGI, use this instead:

AddHandler application/x-httpd-php .html .htm 

Or, you could use this simple rewrite rule:

RewriteEngine on 
RewriteRule ^(.*)\.html $1\.php