【发布时间】:2015-11-17 14:44:21
【问题描述】:
我正在使用 firebase 托管我的 ember 应用程序,并且想使用 locationType=history(url 中没有哈希),因为我也在使用使用 # 的 fullpage.js。
所以我的问题是:我可以将 firebase 配置为仅侦听 base-url 吗?
【问题讨论】:
标签: ember.js firebase fullpage.js firebase-hosting
我正在使用 firebase 托管我的 ember 应用程序,并且想使用 locationType=history(url 中没有哈希),因为我也在使用使用 # 的 fullpage.js。
所以我的问题是:我可以将 firebase 配置为仅侦听 base-url 吗?
【问题讨论】:
标签: ember.js firebase fullpage.js firebase-hosting
您正在寻找的是所谓的重写。
来自Firebase documentation for rewrites:
如果您想为多个 URL 显示相同的内容,请使用重写。
可以通过在
firebase.json文件中定义rewrites部分来指定 URL 重写:
"rewrites": [ {
"source": "**",
"destination": "/index.html"
} ]
请务必阅读文档,因为您可以使用这些规则做更多事情。
【讨论】: