问题
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
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"
}
]
Any ideas?
回答1:
I have the same issue. I think rewrites only support directories not subdomains. The simple solution is to just create two different Firebase projects.
回答2:
As far as I can tell, this is now possible. I found this really good article/video while trying to find a solution: https://fireship.io/lessons/deploy-multiple-sites-to-firebase-hosting/
来源:https://stackoverflow.com/questions/43767095/firebase-rewrite-based-on-subdomain