It seems to be possible in Apache,
enable php script inside HTML
But can I make iIS 7 parse html files for php? My html files currently allow asp, as it would be great if I could just do it with a php file.
My server runs .php files, as you would expect.
I tried to add a handler mapping in IIS with the same values as the * .php mapping that was created with my IIS / PHP installation, only for * .html
This did not work, then I added a handler to my web.config file
<add name="PHP_via_FastCGI" path="*.html" verb="*" modules="FastCgiModule" scriptProcessor="C:\Program Files (x86)\PHP\v5.3\php-cgi.exe" resourceType="Either" requireAccess="Script" />
and that hasn’t changed anything.
When launching an html file with php code, there are no errors in it, the code simply does not start.
Suppose I just can't just change my index.html to index.php.
source