在Firebase中删除HTML文件的文件扩展名 [英] Remove file extensions for html files in firebase

查看:54
本文介绍了在Firebase中删除HTML文件的文件扩展名的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

In firebase.json, is there a way to rewrite (not redirect) all requests to the corresponding .html file but leave other extensions?

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

但是https://example.com/datahttps://example.com/data.xml相同.

推荐答案

这是cleanUrls选项(如 ):

This is the cleanUrls option (as in the docs) in firebase.json:

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

这篇关于在Firebase中删除HTML文件的文件扩展名的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆