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

Force a Directory to load in HTTPS SSL

Use the following .htaccess code to force a particular directory to load in HTTPS/SSL mode. #...

.htaccess RewriteRule Examples

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

GET/POST Security with .htaccess

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

Leverage Browser Caching using .htaccess

Add the following .htaccess rules to the very end of your .htaccess file to reduce the load times...

Resolving XMLRPC DDoS WordPress Attack with .htaccess

Brute Force Attacks against WordPress have always been very common.Here is how to temporarily...