[How To] Execute .html as .php

Rating: 2.7/5
Views: 1783


Some of you have sites that are written in .html and do not want to change the extension of every page but would like the ability to run PHP on a page that ends in .html

This can be achieved on systems that run PHP as a CGI (like ours) by adding the following directive to your .htaccess file:

CODE:
AddHandler application/x-httpd-php .html



If you have a dedicated server and still run PHP as a module then your .htaccess would be like:

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



All GlowHost shared and reseller servers use PHP CGI.

Follow-up and discuss this topic in our forums


Output generated by ProSupport
Copyright © 2024 ProPanelSystems.com - ProSupport v0.9.1 Rev. 1