Web配置中301重定向的500内部服务器错误

时间:2017-05-02 06:41:04

标签: c# asp.net web-config http-redirect

    <rewrite>
     <rules>
     <rule name="301Redirect" stopProcessing="true">
     <match url="(.*)" />
      <conditions logicalGrouping="MatchAll" trackAllCaptures="false">
      <add input="{old:{REQUEST_URI}}" pattern="(.+)" />
       </conditions>
      <action type="Redirect" url="{C:1}" appendQueryString="false" 
       redirectType="Permanent" />
       </rule>
      </rules>
     <rewriteMaps>
     <rewriteMap name="old">
    <add key="/formlocation/form.html?querystring1" value="/pages/page.aspx" />
 <add key="/formlocation/form.html?querystring2" value="/pages/page.aspx" />
  <add key="/formlocation/form.html?querystring3" value="/pages/page.aspx" />
    </rewriteMap>
  </rewriteMaps>
  </rewrite>

我在我的web .config中使用此代码来重定向页面并获得500内部伺服器错误。有什么线索的原因?

0 个答案:

没有答案