[英]IIS 301 redirect specific url to another specific url
如何使用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="wall_mounted_flag" patternSyntax="ExactMatch" stopProcessing="true"> <match url="List.asp" /> <action type="Redirect" url="https://eshop.aplusprint.co.nz/product/wall-flag/" appendQueryString="false" /> <conditions> <add input="{QUERY_STRING}" pattern="id=58" /> </conditions> </rule>
需要條件
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.