基于子域的Firebase重写 [英] Firebase rewrite based on subdomain
本文介绍了基于子域的Firebase重写的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在Firebase上托管了一个项目.我想按如下方式使用域和子域:
I've got a project hosted on firebase. I'd like to use a domain and subdomain as follows:
example.com: rewrite to index-landing.html
app.example.com: rewrite to index.html
有可能吗?我在firebase.json的托管部分下尝试了以下方法:
Is that possible? I've tried the following under the hosting section of firebase.json:
"rewrites": [
{
"source": "https://example.com",
"destination": "/index-landing.html"
},
{
"source": "https://app.example.com/**",
"destination": "/index.html"
}
]
有什么想法吗?
推荐答案
我遇到了同样的问题.我认为重写仅支持目录,而不是子域.简单的解决方案是只创建两个不同的Firebase项目.
I have the same issue. I think rewrites only support directories not subdomains. The simple solution is to just create two different Firebase projects.
这篇关于基于子域的Firebase重写的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文