我正在尝试在web-config中创建重定向,这样 http://myweb/something/download?uri=723911&t=record&lang=ln_english&mbd=true
重定向到 http://mydomain.co.au/hello/world/Record/723911/File/Document
我认为以下方法可以。如您所见,我在webconfig中非常菜鸟。有人可以帮我吗?
<rules>
<rule name="Query String Rule" stopProcessing="true">
<match url="^download$" />
<conditions>
<add input="{QUERY\_STRING}" pattern="(?:^|&)uri=([0-9]+)(?:&|$)" />
<add input="{IDtoTitleMap:{C:1}}" pattern="(.+)" />
</conditions>
<action type="Redirect" url="//mydomain.co.au/hello/world/Record/{C:1}/File/Document" appendQueryString="False" redirectType="Permanent" />
</rule>
</rules>