私は自分のWebサイトにURL書き換えを使用しています。IISで設定を行いましたが、サーバーで機能します。ただし、ローカルホストでは機能しません。プロジェクトファイルにURLが書き換えられたページがないため、これは正常です。どうすればこの問題を解決できますか?プロジェクトを開発するときは、cassiniサーバーを使用します。コンピューターでローカルIISを使用する必要がありますか?ここで、web.configファイルにある私のURL書き換えロールを確認できます。
<system.webServer>
<modules runAllManagedModulesForAllRequests="true" />
<rewrite>
<outboundRules>
<rule name="OutboundRewriteUserFriendlyURL1" preCondition="ResponseIsHtml1">
<match filterByTags="A, Form, Img" pattern="^(.*/)ProductDetail\.aspx\?prid=([^=&]+)&(?:amp;)?product=([^=&]+)$" />
<action type="Rewrite" value="{R:1}ProductDetail/{R:2}/{R:3}/" />
</rule>
<preConditions>
<preCondition name="ResponseIsHtml1">
<add input="{RESPONSE_CONTENT_TYPE}" pattern="^text/html" />
</preCondition>
</preConditions>
</outboundRules>
<rules>
<rule name="RewriteUserFriendlyURL1" stopProcessing="true">
<match url="^urun/([^/]+)/([^/]+)/?$" />
<conditions>
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
</conditions>
<action type="Rewrite" url="ProductDetail.aspx?prid={R:1}&product={R:2}" />
</rule>
</rules>
</rewrite>
<urlCompression doDynamicCompression="false" />
</system.webServer>