Hide Extension

Hide php

This rule set internally rewrites all HTML requests to the PHP file with the same name by matching anything prior to an .html extension and rewriting the request using that match affixed with a .php extension. The [L] flag indicates no RewriteRule should be processed after this one.

This is commonly requested as a way to hide the use of PHP.

RewriteRule ^(.+)\.html$ $1.php [L]

NOTE: PHP is exposed in the HTTP headers by default.