私はいくつかのURL書き換えルールを用意しています(それらはすべて以下にリストされています)。「http://domain.com」を参照すると、「http://www.domain.com/R:」に転送され、「潜在的に危険なRequest.Path値がクライアントから検出されました(:)」というメッセージが表示されます。 。」「www」なしでサイトを閲覧し、正しく転送できるようにしたいと思います。既存の書き換えルールを更新または追加する方法がわかりません。これは.Netサイトです。コミュニティの誰かが私にヒントを与えてくれることを願っています。
<rewrite>
<rules>
<clear />
<rule name="Change to Lower" enabled="true">
<match url="[A-Z]" ignoreCase="false" />
<conditions logicalGrouping="MatchAll" trackAllCaptures="false" />
<action type="Redirect" url="{ToLower:{URL}}" redirectType="Permanent" />
</rule>
<rule name="Redirect to WWW" enabled="true" stopProcessing="true">
<match url=".*" ignoreCase="false" />
<conditions logicalGrouping="MatchAll" trackAllCaptures="false">
<add input="{HTTP_HOST}" pattern="^domain.com$" />
</conditions>
<action type="Redirect" url="http://www.domain.com/R:{0}" redirectType="Permanent" />
</rule>
<rule name="Redirect StockNo" stopProcessing="true">
<match url="^vehicles/detail/default\.aspx$" />
<conditions logicalGrouping="MatchAll" trackAllCaptures="false">
<add input="{REQUEST_METHOD}" pattern="^POST$" negate="true" />
<add input="{QUERY_STRING}" pattern="^stockno=([^=&]+)$" />
</conditions>
<action type="Redirect" url="{C:1}" appendQueryString="false" />
</rule>
<rule name="Rewrite StockNo" stopProcessing="true">
<match url="^([0-9a-z\ ]+)$" />
<conditions logicalGrouping="MatchAll" trackAllCaptures="false">
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
</conditions>
<action type="Rewrite" url="vehicles/detail/default.aspx?stockno={R:1}" />
</rule>
<rule name="Redirect StockNo And Desc" enabled="false" stopProcessing="true">
<match url="^vehicles/detail/default\.aspx$" />
<conditions logicalGrouping="MatchAll" trackAllCaptures="false">
<add input="{REQUEST_METHOD}" pattern="^POST$" negate="true" />
<add input="{QUERY_STRING}" pattern="^stockno=([^=&]+)&desc=([^=&]+)$" />
</conditions>
<action type="Redirect" url="{C:1}/{C:2}" appendQueryString="false" />
</rule>
<rule name="Rewrite StockNo And Desc" enabled="false" stopProcessing="true">
<match url="^([0-9a-z]+)/([0-9]{4}[^/]+)/?$" />
<conditions logicalGrouping="MatchAll" trackAllCaptures="false">
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
</conditions>
<action type="Rewrite" url="vehicles/detail/default.aspx?stockno={R:1}&desc={R:2}" />
</rule>
<rule name="Redirect StockNo Desc And Vin" stopProcessing="true">
<match url="^vehicles/detail/default\.aspx$" />
<conditions logicalGrouping="MatchAll" trackAllCaptures="false">
<add input="{REQUEST_METHOD}" pattern="^POST$" negate="true" />
<add input="{QUERY_STRING}" pattern="^stockno=([^=&]+)&desc=([^=&]+)&vin=([^=&]+)$" />
</conditions>
<action type="Redirect" url="{C:1}/{C:2}/{C:3}" appendQueryString="false" />
</rule>
<rule name="Rewrite StockNo Desc And Vin" stopProcessing="true">
<match url="^([0-9a-z]+)/([0-9]{4}[^/]+)/([0-9a-z]+)/?$" />
<conditions logicalGrouping="MatchAll" trackAllCaptures="false">
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
</conditions>
<action type="Rewrite" url="vehicles/detail/default.aspx?stockno={R:1}&desc={R:2}&vin={R:3}" />
</rule>
<rule name="Redirect Make And Model" stopProcessing="true">
<match url="^vehicles/default\.aspx$" />
<conditions logicalGrouping="MatchAll" trackAllCaptures="false">
<add input="{REQUEST_METHOD}" pattern="^POST$" negate="true" />
<add input="{QUERY_STRING}" pattern="^make=([^=&]+)&model=([^=&]+)$" />
</conditions>
<action type="Redirect" url="{C:1}/{C:2}" appendQueryString="false" />
</rule>
<rule name="Rewrite Make And Model" stopProcessing="true">
<match url="^([a-z\ ]+)/([a-z\ ]+)/?$" />
<conditions logicalGrouping="MatchAll" trackAllCaptures="false">
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
</conditions>
<action type="Rewrite" url="vehicles/default.aspx?make={R:1}&model={R:2}" />
</rule>
<rule name="Redirect Make Model And SubModel" stopProcessing="true">
<match url="^vehicles/default\.aspx$" />
<conditions logicalGrouping="MatchAll" trackAllCaptures="false">
<add input="{REQUEST_METHOD}" pattern="^POST$" negate="true" />
<add input="{QUERY_STRING}" pattern="^make=([^=&]+)&model=([^=&]+)&submodel=([^=&]+)$" />
</conditions>
<action type="Redirect" url="{C:1}/{C:2}/{C:3}" appendQueryString="false" />
</rule>
<rule name="Rewrite Make Model And SubModel" stopProcessing="true">
<match url="^([a-z\ ]+)/([a-z\ ]+)/([a-z\ ]+)/?$" />
<conditions logicalGrouping="MatchAll" trackAllCaptures="false">
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
</conditions>
<action type="Rewrite" url="vehicles/default.aspx?make={R:1}&model={R:2}&submodel={R:3}" />
</rule>
<rule name="Redirect Make An Offer StockNo" stopProcessing="true">
<match url="^Vehicles/Make-An-Offer\.aspx$" />
<conditions logicalGrouping="MatchAll" trackAllCaptures="false">
<add input="{REQUEST_METHOD}" pattern="^POST$" negate="true" />
<add input="{QUERY_STRING}" pattern="^stockno=([^=&]+)$" />
</conditions>
<action type="Redirect" url="Vehicles/Make-An-Offer/{C:1}" appendQueryString="false" />
</rule>
<rule name="Rewrite Make An Offer StockNo" stopProcessing="true">
<match url="^Vehicles/Make-An-Offer/([^/]+)/?$" />
<conditions logicalGrouping="MatchAll" trackAllCaptures="false">
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
</conditions>
<action type="Rewrite" url="Vehicles/Make-An-Offer.aspx?stockno={R:1}" />
</rule>
<rule name="Redirect Make An Offer StockNo And Desc" stopProcessing="true">
<match url="^Vehicles/Make-An-Offer\.aspx$" />
<conditions logicalGrouping="MatchAll" trackAllCaptures="false">
<add input="{REQUEST_METHOD}" pattern="^POST$" negate="true" />
<add input="{QUERY_STRING}" pattern="^stockno=([^=&]+)&desc=([^=&]+)$" />
</conditions>
<action type="Redirect" url="Vehicles/Make-An-Offer/{C:1}/{C:2}" appendQueryString="false" />
</rule>
<rule name="Rewrite Make An Offer StockNo And Desc" stopProcessing="true">
<match url="^Vehicles/Make-An-Offer/([^/]+)/([^/]+)/?$" />
<conditions logicalGrouping="MatchAll" trackAllCaptures="false">
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
</conditions>
<action type="Rewrite" url="Vehicles/Make-An-Offer.aspx?stockno={R:1}&desc={R:2}" />
</rule>
<rule name="Redirect to Default" enabled="true">
<match url="(.*)default.aspx" ignoreCase="false" />
<conditions logicalGrouping="MatchAll" trackAllCaptures="false" />
<action type="Redirect" url="{R:1}" redirectType="Permanent" />
</rule>
<rule name="Add Trailing Slash" enabled="true">
<match url="[^/]$" ignoreCase="false" />
<conditions logicalGrouping="MatchAll" trackAllCaptures="false">
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{URL}" pattern="\.axd$" ignoreCase="false" negate="true" />
</conditions>
<action type="Redirect" url="{URL}/" appendQueryString="false" redirectType="Permanent" />
</rule>
</rules>
<outboundRules>
<preConditions>
<preCondition name="ResponseIsHtml1">
<add input="{RESPONSE_CONTENT_TYPE}" pattern="^text/html" />
</preCondition>
</preConditions>
</outboundRules>
<rewriteMaps>
<rewriteMap name="test" />
</rewriteMaps>