【问题标题】:setting rule in IIS url rewrite module在 IIS url 重写模块中设置规则
【发布时间】:2012-11-05 15:07:12
【问题描述】:

我正在寻求帮助制定 URL 重写规则以重定向所有以

开头的 url

http://localhost:13080/saCore/ws/messagebroker[这里有一些变化]

http://localhost:13080/saCore/ws/messagebroker/MessageBroker.asmx[这里有一些变化]

我只需要在消息代理部分之后将 MessageBroker.asmx 推送到路径中间。

感谢您的帮助。

【问题讨论】:

    标签: asp.net iis iis-7 url-rewriting


    【解决方案1】:

    这应该可以完成工作,您可以将其直接添加到applicationHost.config 或使用 IIS 管理器创建规则:

    <rule name="RedirectBroker" stopProcessing="true">
        <match url="^saCore/ws/messagebroker(.*)" />
        <conditions>
            <add input="{HTTP_HOST}" pattern="^localhost$" />
            <add input="{SERVER_PORT}" pattern="^13080$" />
        </conditions>
        <action type="Rewrite" url="/saCore/ws/messagebroker/MessageBroker.asmx{R:1}" appendQueryString="true" />
    </rule>
    

    【讨论】:

      猜你喜欢
      • 2014-02-02
      • 2014-10-27
      • 2014-05-01
      • 2017-01-02
      • 2011-04-21
      • 1970-01-01
      • 2018-02-01
      相关资源
      最近更新 更多