簡體   English   中英

IIS 301將特定的URL重定向到另一個特定的URL

[英]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.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM