Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/go/7.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
IIS ARR规则。相配_Iis_Rules_Arr - Fatal编程技术网

IIS ARR规则。相配

IIS ARR规则。相配,iis,rules,arr,Iis,Rules,Arr,我在IIS中获得了虚拟主机: http://sampleserver.org 我想将此URL重定向到tomcat应用程序http://localhost:8081/one 但是我不想重定向url http://sampleserver.org/two至http://localhost:8081/one/two 所以我的规则是这样的: <rule name="Root zu Client" enabled="true" patternSyntax="ECMAScript" stopProc

我在IIS中获得了虚拟主机:

http://sampleserver.org
我想将此URL重定向到tomcat应用程序
http://localhost:8081/one

但是我不想重定向url

http://sampleserver.org/two
http://localhost:8081/one/two

所以我的规则是这样的:

<rule name="Root zu Client" enabled="true" patternSyntax="ECMAScript" stopProcessing="false">
  <match url=".*" ignoreCase="false" negate="false" />
  <conditions logicalGrouping="MatchAll" trackAllCaptures="true">
    <add input="{REQUEST_URI}" pattern="^two" negate="true" />
  </conditions>
  <action type="Rewrite" url="http://localhost:8081/one/{R:0}" logRewrittenUrl="true" />
</rule>

我想将所有内容重定向到tomcat,但
^two
除外


这是不可能的还是我遗漏了什么?

模式不正确。如果不希望重定向url,则必须应用以下内容:

  <rule name="RuleTWO" patternSyntax="Wildcard" stopProcessing="true">
        <match url="*" />
        <conditions>
            <add input="{REQUEST_URI}" pattern="*/two*" negate="true"/>
        </conditions>
        <action type="Rewrite" url="http://localhost:8081/one/{C:2}" />
    </rule>

This:[Emptyness]?或者你的意思是一个结束的斜杠?