我正在使用firebase托管我的ember应用程序,并且想使用locationType = history(url中没有哈希),因为我也使用fullpage.js,它使用#。
所以我的问题是:我可以将firebase配置为仅侦听base-url吗?
答案 0 :(得分:3)
您正在寻找的是所谓的重写。
来自Firebase documentation for rewrites:
如果要为多个网址显示相同的内容,请使用重写。
可以通过在
rewrites
文件中定义firebase.json
部分来指定网址重写:
"rewrites": [ {
"source": "**",
"destination": "/index.html"
} ]
请务必阅读文档,因为您可以使用这些规则做更多事情。