在Firebase中删除HTML文件的文件扩展名 [英] Remove file extensions for html files in firebase
本文介绍了在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/data
将不与https://example.com/data.xml
相同.
推荐答案
This is the cleanUrls
option (as in the docs) in firebase.json
:
{
"hosting": {
"cleanUrls": true
}
}
这篇关于在Firebase中删除HTML文件的文件扩展名的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文