【问题标题】:exclude a URL from rewrites从重写中排除 URL
【发布时间】:2019-03-07 16:55:03
【问题描述】:

我有一个在iis 上运行的nodejs 应用程序。

我有 url 重写规则,它将所有请求发送到自定义 server.js 页面。

我想添加新规则或修改现有规则,以便特定 url /something 到达 iis 而不是我编写的规则。

我目前的规则:

    <rewrite>
        <rules>
            <rule name="node">
                <match url="/*" />
                <action type="Rewrite" url="server.js" />
            </rule>
        </rules>
    </rewrite>

请帮忙解决这个问题。

【问题讨论】:

标签: iis url-rewriting url-rewrite-module


【解决方案1】:
            <rule name="sendToNode">
                <match url="/*" />
                <conditions>
                    <add input="{URL}" pattern="/something$" negate="true" />
                </conditions>
                <action type="Rewrite" url="server.js" />
            </rule>

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-02-18
    相关资源
    最近更新 更多