【问题标题】:app_offline.htm not working for rewritten URLsapp_offline.htm 不适用于重写的 URL
【发布时间】:2013-09-18 20:45:56
【问题描述】:

我有一个特定页面的重写规则,使其对 SEO 更友好。

<rewrite>
    <rules>
        <rule name="Friendly Threads">
            <match url="Topic/([^/]*)/([^/]*)/[^[#\?]*\??(.*)" />
            <action type="Rewrite" url="thread_messages.asp?ThreadID={R:1}&amp;PageNumber={R:2}&amp;{R:3}" />
        </rule>
    </rules>
</rewrite>

但每当我将app_offline.htm 文件放到根目录中时,该站点将转到app_offline.htm 页面,以获取除与上述匹配项之外的所有URL。

这是预期的,还是我可能在某处配置错误?

如果有什么不同的话,这是一个在 IIS 8 (Windows 2012) 下运行的经典 ASP 站点。

(是的,我知道这就像让一个 90 岁的老人坐在兰博基尼的方向盘后面。)

【问题讨论】:

    标签: asp.net iis-7 asp-classic url-rewriting iis-8


    【解决方案1】:

    据我所知app_offline.htm 仅适用于 ASP.NET。由于重写结果是经典的ASP,页面由另一个IIS模块处理,所以它不会关心app_offline.htm的存在。

    换句话说,你没有做错,但是经典的 ASP 不支持app_offline.htm

    【讨论】:

      猜你喜欢
      • 2016-01-02
      • 1970-01-01
      • 2019-09-04
      • 2019-03-13
      • 2012-10-05
      • 1970-01-01
      • 2012-12-01
      • 1970-01-01
      • 2021-08-03
      相关资源
      最近更新 更多