Configure HTML Files to be parsed as PHP file in Apache
Nov 13, 2008 Technology
This has been one of the most frequently asked questions that php developers ask me, about how to configure Apache to serve files with .html extenstion as php files and let php to parse those files before they are sent to the client.
Solution
The solution is very simple, all you have to do is to add a “AddType” directive either in your .htaccess or httpd.conf of your Apache
AddType application/x-httpd-php .html
Save and restart your apache(if you did the changes in httpd.conf ) and your are done !
Now you will eb able to parse .html files as php files.
Tags: apache, php, Technology





