How to execute php code as .htm or .html files

In your .htaccess file insert this line of code.

addhandler application/x-httpd-php .htm .html

Was this answer helpful?

Also Read

Redirect non-www to www over http and https

Use the following .htaccess code to redirect non-www URLs to www over http and https. Create, or...

GET/POST Security with .htaccess

Below is a useful code to block out some common exploits for GET/POST values with .htaccessSimply...

How to Remove Multiple Slashes from URL

You can use this .htaccess rule for removing multiple trailing slashes anywhere in URL:...

.htaccess RewriteRule Examples

Here are some useful mod_rewrite RewriteRule redirect examples that you can use in your .htaccess...

Block visitors by IP address using .htaccess

Deny access based upon IP address, or an IP block, by placing the following code into your...