0

有人可以让我知道为什么以下内容无法正确重写吗?

<rule name="Redirect account listing with levelId" stopProcessing="true">
<match url="^account/([^/]+)/([^/]+)/([^/]+)[?levelId=]$" />
<conditions>
  <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
  <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
</conditions>
<action type="Redirect" url="account/{R:1}/{R:2}/{R:3}" appendQueryString="false" />

我正在尝试重定向,以便删除 "?levelId=。

4

1 回答 1

1

我想到了...

<rule name="Redirect account listing with levelId b" stopProcessing="true">
<match url="^account/([^/]+)/([^/]+)/([^/]+)" />
<conditions>
  <add input="{REQUEST_METHOD}" pattern="^POST$" negate="true" />
  <add input="{QUERY_STRING}" pattern="^levelID=([^=&amp;]+)$" />
</conditions>
<action type="Redirect" url="account/{R:1}/{R:2}/{R:3}" appendQueryString="false" />

于 2012-12-11T13:36:31.980 回答