繁体   English   中英

添加“?” 使用 IIS URL 重写

[英]Adding a "?" using IIS URL Rewrite

我需要创建一个 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 重写规则。

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

结果:

在此处输入图片说明

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM