【问题标题】:"Rewrite Action" 404 Server Error! (IIS 7.0 MS URL Re-Write Module)!“重写操作” 404 服务器错误! (IIS 7.0 MS URL 重写模块)!
【发布时间】:2011-07-01 09:55:30
【问题描述】:

谁能告诉我为什么这会返回 404 但在我重定向它时有效!

<rule name="Static All Paging" stopProcessing="true">
 <match url="(.*)page-([0-9]+)$" />
 <action type="Rewrite" url="{R:1}?P={R:2}" appendQueryString="true" />
</rule>

【问题讨论】:

    标签: mod-rewrite iis-7 url-rewriting http-status-code-404


    【解决方案1】:

    最简单的做法是启用失败请求跟踪并查看 URL 重写的最终结果http://learn.iis.net/page.aspx/467/using-failed-request-tracing-to-trace-rewrite-rules/

    有几件事可能会发生,但很难知道。您确定两个 URL 都在同一个应用程序池中运行吗?这可能是重定向有效但不能重写的原因之一。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2010-11-10
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-05-04
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多