【问题标题】:IIS rewrite rule with curly brackets带大括号的 IIS 重写规则
【发布时间】:2017-11-03 17:33:04
【问题描述】:

我有一个这样的重写规则,但我无法用 url 中的 () 重写它,我想我做错了什么。

<rule name="Redirect fitness-industry">
    <match url="^subjects/fitness-industry/active-iq-certificate-in-fitness-instructing-(gym)/level-2" />
    <action type="Redirect" url="/" />
</rule>

提前感谢您的帮助! 康纳

【问题讨论】:

  • 用([a-z]+)替换(gym)

标签: .net iis url-rewriting web-config


【解决方案1】:
\([a-z]+\)

在括号前添加\ 是解决方案!

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2017-08-31
    • 2011-06-21
    • 1970-01-01
    • 2018-02-12
    • 2017-07-30
    • 1970-01-01
    相关资源
    最近更新 更多