Web.config正则表达式OR运算符

时间:2014-09-29 12:29:08

标签: regex web-config

我的webconfig中有以下规则

<rule name="accommidationRewrite2" enabled="true" stopProcessing="true">
                <match url="accommodation/(?!results|!property).*?(.*)/" />
                <action type="Rewrite" url="/index.cfm/?path=/accommodation/results/params/location/{R:1}/" />
            </rule>

我试图让规则开始是URL不是'住宿/结果/ ....'或'住宿/财产/ .......'

目前它仅适用于结果网址。我可以让它适用于两个URL吗?

1 个答案:

答案 0 :(得分:0)

删除!之前的property符号,

accommodation/(?!results|property).*?(.*)/
相关问题