Firebase rewrite based on subdomain

I have a project hosted on firebase. I would like to use domain and subdomain like this:

example.com: rewrite to index-landing.html
app.example.com: rewrite to index.html

      

Is it possible? I've tried the following in 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?

+3


source to share


1 answer


I have the same problem. I think it only rewrites support directories, not subdomains. The simple solution is to simply create two different Firebase projects.



+1


source







All Articles