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
OR
change line 21
From
<FilesMatch “\.php$”>
To
<FilesMatch “\.php$|\.html$”>
and it worked great.
Plurk This Post
Buzz This Post
Delicious
Digg This Post
Ping This Post
Reddit This Post
Stumble This Post
Which the directory root of the file did you change? I encounter the same problem.
The File’s path is “G:\xampp\apache\conf\extra\httpd-xampp.conf” on my machine. Hope this’ll help.
Thanks