Forward .html/.htm to .php with .config

Posted by PhilipK on Pro Webmasters See other posts from Pro Webmasters or by PhilipK
Published on 2011-11-19T04:02:44Z Indexed on 2011/11/19 18:15 UTC
Read the original article Hit count: 269

Filed under:
|

I'm moving a site from my linux hosted server to a client's windows hosted server.

The .htaccess file no longer works and I'm told that windows servers use .config .

How can I forward all users accessing .html & .htm files to the equivalent .php file.

Server Info...

OS/Hosting Type: Windows / Shared Hosting

.Net Runtime Version: ASP.Net 2.0/3.0/3.5

PHP Version: PHP 5.2

IIS Version: IIS 7.0

Data Center: US Regional

EDIT

*Hosting provided by GoDaddy

Was told by a friend following should work but it has no effect on the site.

<configuration>
<system.webServer>
    <handlers>
        <add name="PHP-FastCGI" verb="*" 
            path="*.html" 
            modules="FastCgiModule"
            scriptProcessor="c:\php\php-cgi.exe" 
            resourceType="Either" />
    </handlers>
</system.webServer>
</configuration>

© Pro Webmasters or respective owner

Related posts about iis7

Related posts about htaccess