IIS構成で2つのルールに従う必要があります(scottguによる):
<rule name="RemoveTrailingSlashRule1" stopProcessing="true">
<match url="(.*)/$" />
<conditions>
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
</conditions>
<action type="Redirect" url="{R:1}" />
</rule>
<rule name="CanonicalHostNameRule1" enabled="true">
<match url="(.*)" />
<conditions>
<add input="{HTTP_HOST}" pattern="^dev\.testing\.ch$" negate="true" />
</conditions>
<action type="Redirect" url="http://dev.testing.ch/{R:1}" />
</rule>
CanonicalHostNameRule1は、すべてのhttp://testing.chをhttp://www.testing.ch/に転送します。
そして2番目のルールはバックスペースを削除します/
空のtesting.chリクエストをwww.testing.ch(バックスペースなし)に転送できればもっと良いでしょう。しかし、このように削除しただけでは、明らかに機能しません。
<action type="Redirect" url="http://dev.testing.ch{R:1}" />