如何从web.config中的url中检查params

发布于 2025-01-31 17:03:02 字数 641 浏览 2 评论 0原文

我想将此URL的结果

www.test.com/shop/?wc-ajax=update_order_review

与任何其他URL分开:

www.test.com/shop/?param=update_order_review
www.test.com/shop//
www.test.com/shop

以及我所寻找的其他URL的结果,将其他URL重定向到另一个页面,例如:“ http://test.com/products”

注:此条件仅在/shop上工作/ 文件夹。

<rule name="rule01" patternSyntax="Wildcard" stopProcessing="true">
<match url="^(.*)test.com/shop/?wc-ajax=update_order_review" />
<action type="Redirect" url="https://www.test.co/products/" ppendQueryString="false" />
<serverVariables>
</serverVariables>
</rule>

I want to divide result of this url

www.test.com/shop/?wc-ajax=update_order_review

With any other url like:

www.test.com/shop/?param=update_order_review
www.test.com/shop//
www.test.com/shop

And what I looking, result of other Url redirect to another page, like: "http://test.com/products"

Note: This condition only works on /shop/ folder.

<rule name="rule01" patternSyntax="Wildcard" stopProcessing="true">
<match url="^(.*)test.com/shop/?wc-ajax=update_order_review" />
<action type="Redirect" url="https://www.test.co/products/" ppendQueryString="false" />
<serverVariables>
</serverVariables>
</rule>

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文