【发布时间】:2018-05-29 04:03:54
【问题描述】:
如何使用 IIS 将一个 URL 重定向到另一个 URL? 例如: 我得到了http://www.aplusprint.co.nz/List.asp?id=58 希望重定向到 https://eshop.aplusprint.co.nz/product/wall-flag/
我希望一对一重定向,这意味着当 id 更改时,新 url 将更改。
我创建了一个测试重写规则,但不起作用
<configuration>
<system.web>
<identity impersonate="true" />
<httpRuntime maxRequestLength="8192" />
</system.web>
<system.webServer>
<rewrite>
<rules>
<rule name="wall_mounted_flag" patternSyntax="ExactMatch" stopProcessing="true">
<match url="List.asp?id=58" />
<action type="Redirect" url="https://eshop.aplusprint.co.nz/product/wall-flag/" appendQueryString="false" />
</rule>
</rules>
</rewrite>
<httpErrors errorMode="Detailed" />
</system.webServer>
谁能帮帮我?
【问题讨论】:
-
<rule name="About Us Redirect" patternSyntax="ExactMatch" stopProcessing="true"> <match url="Aboutus.asp" /> <action type="Redirect" url="https://eshop.aplusprint.co.nz/aboutus/" appendQueryString="false" /> </rule>可以工作
标签: asp.net redirect iis url-redirection