Krishna Shasankar's Life Blog

This blog is a HTML virus which will format your C: Drive ..... Be Careful :)

Thursday, March 08, 2007

Processing HTML Files as PHP Files

This is one of the most useful configurations that you need when you try to configure php on a apache web server.

Parsing HTML files as PHP Files

There are a lot of advantages in rendering PHP code as HTML files instad of a ".php " file.

  • HTML extensions are user friendly
  • say if you are migrating a site from some other technology to php, this can be very helpful.
The Process of adding .html extension to php scripts is relatively easy. Jus add the following line to your .htaccess or httpd.conf file

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

and thats all its done. This works fine with the my version of apache (HTTP Server 2.0.59).

Labels:

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home