仅在asp中重定向/重写特定的url

时间:2018-08-07 13:03:48

标签: asp.net url-rewriting

我正在尝试让我的page.com/here重定向到page.com/?info=here。我的web.config文件中包含以下内容:

    <rewrite>

<rules>


                <rule name="try" stopProcessing="true">
                    <match url="/here$" />
                    <action type="Redirect" url="http://page.com/?info=here" logRewrittenUrl="true" />
                </rule>   

</rules>

</rewrite>

但是,当我转到page.com/here时,它会将我发送到我的自定义404页面。

1 个答案:

答案 0 :(得分:0)