これは IIS7 でのみ機能し、IIS6 では機能しないことに注意してください。また、FastCGI をセットアップし、URL 書き換えモジュールをインストールして有効にする必要があります。これらは、ホスティング会社が確認できるものです。上記のすべてが当てはまる場合は、次のファイルでうまくいくはずです (パスを微調整する必要があるかもしれませんが、このサンプル ファイルを提供すれば、ホストはこれを行うことができると思います。
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<configSections>
<sectionGroup name="system.webServer">
<sectionGroup name="rewrite">
<section name="rewriteMaps" overrideModeDefault="Allow" />
<section name="rules" overrideModeDefault="Allow" />
</sectionGroup>
</sectionGroup>
</configSections>
<system.webServer>
<!-- Mapping the .do extension to the PHP ISAPI module -->
<handlers>
<!-- the following line is very specific to your host
please check the module name and the scriptProcessor
path with the system administrator! basically this is
the same as
http://learn.iis.net/page.aspx/246/using-fastcgi-to-host-php-applications-on-iis-70/#EnableFastCGI
only in .config format. -->
<add name="MaskDoAsPHP" path=".do" verb="GET,HEAD,POST,DEBUG" modules="FastCgiModule" scriptProcessor="C:\PHP\php-cgi.exe" />
</handlers>
<!-- Setting the default handler. -->
<defaultDocument>
<files>
<clear />
<add value="home.do" />
</files>
</defaultDocument>
<rewrite>
<rules>
<rule name="Removing do extension" stopProcessing="true">
<match url="^(.*)$" ignoreCase="false" />
<conditions>
<add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" />
</conditions>
<action type="Rewrite" url="{R1}.do" appendQueryString="true" />
</rule>
</rules>
</rewrite>
</system.webServer>