【问题标题】:Adding a "?" using IIS URL Rewrite添加一个“?”使用 IIS URL 重写
【发布时间】:2020-04-02 13:42:56
【问题描述】:

我需要创建一个 URL 重写,以便当用户键入:mydomain.com/test123 时,服务器会得到:mydomain.com/?test123。

我试过了:

<rule name="UF" stopProcessing="true"> <match url="example.com/([_0-9a-z-]+)" /> <action type="Redirect" url="https://example.com/?{R:1}" /> </rule>

【问题讨论】:

标签: url redirect iis url-rewriting


【解决方案1】:

根据你的描述,我建议你可以尝试使用下面的url重写规则。

            <rule name="UF" stopProcessing="true">
                <match url="([_0-9a-z-]+)" />
                <action type="Redirect" url="https://example.com/?{R:1}" appendQueryString="false" />
            </rule>

结果:

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2015-02-06
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-09-11
    • 2010-11-04
    • 1970-01-01
    相关资源
    最近更新 更多