Home > PHP > Parse .html as PHP in XAMPP

Parse .html as PHP in XAMPP

July 30th, 2009

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.

Share and Enjoy:
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks

Post to Twitter Post to Plurk Plurk This Post Post to Yahoo Buzz Buzz This Post Post to Delicious Delicious Post to Digg Digg This Post Post to Ping.fm Ping This Post Post to Reddit Reddit This Post Post to StumbleUpon Stumble This Post

PHP , , , ,

  1. September 28th, 2010 at 01:53 | #1

    Which the directory root of the file did you change? I encounter the same problem.

  2. Ustaad
    September 28th, 2010 at 16:44 | #2

    The File’s path is “G:\xampp\apache\conf\extra\httpd-xampp.conf” on my machine. Hope this’ll help.

    Thanks

  1. No trackbacks yet.

Twitter links powered by Tweet This v1.6.1, a WordPress plugin for Twitter.