Apache parse PHP from within files using ‘.html’ extension

Recently I had someone that needed to move their site to a new server. The site was entirely created with the files using the .html extension, but had embeded inside.

I simply cleared this up by adding the following line to the httpd.conf, and after a reboot of Apache i was set to go.

AddType application/x-httpd-php .html

If you were to need this type of action for files using the .htm extension you would do the same thing, but replace the .html to .htm in the line.

Published by


Speaker, author, consultant, OSS contributor, SoFloPHP UG and SunshinePHP Conf organizer, RunGeekRadio Host, Long distance runner and ultra marathoner.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.