New Feature Announcement: Master Your Email Delivery with the Mail Delivery Center

How can I parse .html or .htm files as .php?

If using CloudLinux lsapi /LiteSpeed API, use the following:

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

For other PHP Handlers, you can use try the following…

Create a .htaccess file and upload it to the root of your public_html directory. Include the following lines…

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

Because these extensions will be processed as PHP with the above command, changing the permission on those file types to 755 may be necessary.

If the above line does not work use the following:

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

  • 305 Users Found This Useful
Was this answer helpful?

Related Articles

 Connect to your server via SSH

SSH allows secure file transfer and remote logins over the internet. Your connection via SSH is...

 How to force your site to use SSL (HTTPS) using

First of all, you will need to install an SSL certificate to your siteOnce your certificate is...

 How do I change PHP versions, or change my PHP settings / config?

The process of setting your PHP version and the 'variables' (such as memory_limit values) differs...

 How do I install a free SSL via cPanel?

Installing an SSL certificate in cPanel is easy! Best of all, it's free with WebGee!Important:...

 How to send emails in WordPress using the WP SMTP Mail plugin

Instead of using the default PHP mail() function, you can send emails using our SMTP services via...

Powered by WHMCompleteSolution