【问题标题】:Remove file extensions for html files in firebase删除 firebase 中 html 文件的文件扩展名
【发布时间】:2020-03-14 10:04:34
【问题描述】:

firebase.json 中,有没有办法将所有请求重写(而不是重定向)到相应的 .html 文件但保留其他扩展名?

例如,https://example.com/foo 将与 https://example.com/foo.html 相同。

https://example.com/datahttps://example.com/data.xml 相同。

【问题讨论】:

    标签: firebase web firebase-hosting


    【解决方案1】:

    这是firebase.json 中的cleanUrls 选项(如in the docs):

    {
      "hosting": {
        "cleanUrls": true
      }
    }
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2020-08-06
      • 1970-01-01
      • 2016-12-28
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多