如何在IIS重写重定向规则中排除指定的文件夹

时间:2015-08-11 06:04:52

标签: asp.net-mvc iis url-rewriting url-rewrite-module

我有一个重定向到移动网站的重写规则。重定向工作正常,但我想排除一个文件夹说〜/ Content。我被困在重写规则以排除一个文件夹。以下是重定向到移动网站的规则

    <rule name="Mobile Rewrite" patternSyntax="ECMAScript" stopProcessing="true">
      <match url=".*" ignoreCase="true" negate="false" />
      <conditions logicalGrouping="MatchAny" trackAllCaptures="false">
        <add input="{HTTP_USER_AGENT}" pattern="android|blackberry|googlebot-mobile|iphone|ipod|opera mobile|palmos|webos" />
        <add input="{HTTP_X-Device-User-Agent}" pattern="midp|mobile|phone" />
        <add input="{HTTP_X-OperaMini-Phone-UA}" pattern="midp|mobile|phone" />
      </conditions>
      <action type="Redirect" url="http://localhost/" appendQueryString="false" redirectType="Found" />
    </rule>

0 个答案:

没有答案