我有一个托管在 firebase 上的项目。我想使用域和子域,如下所示:
example.com: rewrite to index-landing.html
app.example.com: rewrite to index.html
那可能吗?我在 firebase.json 的托管部分尝试了以下内容:
"rewrites": [
{
"source": "https://example.com",
"destination": "/index-landing.html"
},
{
"source": "https://app.example.com/**",
"destination": "/index.html"
}
]
有任何想法吗?
最佳答案
我有同样的问题。我认为重写只支持目录而不是子域。简单的解决方案是创建两个不同的 Firebase 项目。
关于firebase-hosting - 基于子域的 Firebase 重写,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43767095/