微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

Web 配置 URL 重写返回 410?

如何解决Web 配置 URL 重写返回 410?

首先,我很想了解您对我的规则为何不起作用的看法。其次,为什么是 410?!

我对 C# 还很陌生,因此非常感谢您提供直观的动手响应!

    <rule name="rewriteChess">
      <match url="^chess/([^/]+)?$" />
      <conditions>
        <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
        <add input="{REQUEST_URI}" pattern="\.js|\.css|\.img|\.scimg" negate="true" />
      </conditions>
      <action type="Rewrite" url="/chess/template.aspx?t={R:1}" appendQueryString="false" />
    </rule>

/chess/brandi

不工作 - 并且是 410 响应 - 这就是我想要重写的内容

/chess/template.aspx?t=brandi

工作(所以数据拉得很好)

编辑: 如果我注释掉以下规则,它会起作用...

<rule name="rewritecat">
  <match url="^([^/]+)/?$" />
  <conditions>
    <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
    <add input="{REQUEST_URI}" pattern="\.js|\.css|\.img|\.scimg" negate="true" />
  </conditions>
  <action type="Rewrite" url="/category.aspx?c={R:1}" appendQueryString="false" />
</rule>

<rule name="rewritereview">
  <match url="^([^/]+)/([^/]+)?$" />
  <conditions>
    <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
    <add input="{REQUEST_URI}" pattern="\.js|\.css|\.img|\.scimg" negate="true" />
  </conditions>
  <action type="Rewrite" url="/review.aspx?c={R:1}&amp;t={R:2}" appendQueryString="false" />
</rule>

如何在不注释的情况下绕过它? :S

谢谢!

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。