There was a problem loading the comments.

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

Support Portal  »  Knowledgebase  »  Viewing Article


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 an .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


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

Share via
Did you find this article useful?  

Related Articles

© Brixly