How to parse .html or .htm files as .php?

Yes, you can do it by the help of CloudLinux lsapi/LiteSpeed API, use the following:

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

For other PHP Handlers, you can utilize the following:

Make a .htaccess file and transfer it to your public_html folder and add below lines:

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

Since these expansions will be prepared as PHP because of the above command, changing the permission on those file types to 755 might be required.

In case above command not working properly, you can use command as below:

AddType application/x-httpd-php5 .php5 .php4 .php .php3 .php2 .phtml .html .htm

or

AddType application/x-httpd-php .php5 .php4 .php .php3 .php2 .phtml .html .htm

Please enter a valid email address.

cPanel Reseller Hosting

We at Cyberin designed a reseller plan for those who want to take their first step in hosting business as always dreamed, latest cPanel, premium add ons, World-class data centers and almost 100% uptime

Try ₹399 only

cPanel Web Hosting

Seamless cheapest cPanel hosting for a personal site to a giant client, deploy thousands of open source apps on one click, or import a project from GitHub, everything is smooth and simple as possible.

Try ₹29 only