【问题标题】:IIS URL Rewrite - Page ForwardIIS URL 重写 - 页面转发
【发布时间】:2020-08-24 13:31:39
【问题描述】:

我现在一直在搞乱 URL 重写,但是,尽管阅读了文档,但我无法让它工作 - 所以这可能只是我对它们缺乏了解。

我有以下网址:

www.testsite.company.com/tasks

但是,我想将对此 URL 的任何请求转发到:

www.testsite.company.com/tasks/dashboard

如何使用 IIS URL 重写规则来完成此任务?

任何帮助将不胜感激,谢谢。

【问题讨论】:

    标签: redirect iis url-rewriting


    【解决方案1】:

    您可以尝试使用以下规则:

     <rule name="Forward rule" stopProcessing="true">
                    <match url="(.*)" />
                    <conditions>
                        <add input="{REQUEST_URI}" pattern="^/tasks/$" />
                    </conditions>
                    <action type="Redirect" url="http://example.com/tasks/dashboard" />
                </rule>
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-08-04
      • 1970-01-01
      • 2022-01-11
      • 2020-01-18
      • 2016-05-03
      相关资源
      最近更新 更多