How to parse PHP in html files?

Are you looking to make all the .html pages of your websites to run as .php or you are looking to parse the PHP in HTML files? Please add the below line to your .htaccess file.

AddHandler application/x-httpd-lsphp .htm .html

IMP: Ensure that you take the backup of your existing .htaccess file before making any changes to your existing .htaccess file

  • 0 Users Found This Useful

Was this answer helpful?

Related Articles

How to Switch Web Server from Apache to LiteSpeed on WHM?

Apache and LiteSpeed both are the WebServers. Apache is older and popular compared to LiteSpeed....

How to Safely Change the Location of MySQL/MariaDB Data Directory on cPanel/WHM Servers?

You may require to change the MySQL data directory due to insufficient partition space on /var or...

How to install CentOS Web Panel on CentOS 7.x

This article will guide you on how to install CentOS Web Panel on CentOS 7.xCentOS web panel is...

Is it possible to take complete VPS backup in VPS itself?

Please note that, there is no provision to take backup of full VPS image in VPS itself. As an...

How to find all files/folders with 777 permission in Linux?

First of all, let us understand the meaning of 777 file permission in Linux. Suppose, any of the...