It seems to be possible to do so in Apache,
include php script inside HTML
But can I make my IIS 7 parse html files for php? Currently my html files allow as
I had to get this working for a site migrated from apache to IIS that used a mixture of .php
and .html
for it's scripts. I have this (cropped useless stuff) in my web.config:
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<handlers>
<add name="PHP53_via_FastCGI_HTML" path="*.html" verb="GET,HEAD,POST" modules="FastCgiModule" scriptProcessor="C:\Program Files (x86)\PHP\v5.3\php-cgi.exe" resourceType="File" requireAccess="Script" />
</handlers>
</system.webServer>
</configuration>
Have you got it in the right section? I hate that most web.config examples I see don't actually tell you want section they should be in </rant>