Parse .html as PHP in XAMPP

How can I configure Apache to treat .html files as PHP?

This is very common issue faced by almost every developer at some point, recently I had it on my XAMPP setup (version 1.7.1). Other concerning details are:

###### ApacheFriends XAMPP (Basispaket) version 1.7.1 ######

+ Apache 2.2.11
+ MySQL 5.1.33 (Community Server)
+ PHP 5.2.9 + PEAR (Support for PHP 4 has been discontinued)

Solution:

I simply changed following line:

<FilesMatch “\.php$|\.php5$|\.php4$|\.php3$|\.phtml$|\.phpt$”>

to

<FilesMatch “\.php$|\.php5$|\.php4$|\.php3$|\.phtml$|\.phpt$|\.html$“>

in httpd-xampp.conf

and it worked great.

Add a Comment

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