I currently have an app deployed to Firebase hosting with the following structure:
public/
appSub1/
index.html
appSub2
index.html
index.html
I have already added and connected my subdomains such that
appSub1.mysite.com/ -> app.firebaseapp.com/
appSub2.mysite.com/ -> app.firebaseapp.com/
I am trying to configure the redirects to properly associate the subdomains with the correct app subfolder such that
appSub1.mysite.com/ -> app.firebaseapp.com/appSub1/
appSub2.mysite.com/ -> app.firebaseapp.com/appSub2/
The app is still correctly displayed if I manually add the sub paths, but not without them. So going to appSub1.mysite.com/ just ends up at a blank page, but going to appSub1.mysite.com/appSub1/ ends up at the correct index.html
This is my current hosting configuration in firebase.json
"hosting": {
"public": "public",
"ignore": [
"firebase.json",
"**/.*",
"**/node_modules/**"
],
"rewrites": [
{
"source": "appSub1.mysite.com/**",
"destination": "/appSub1/**",
"type": 301
},
{
"source": "appSub2.mysite.com/**",
"destination": "/appSub2/**",
"type": 301
}
]
},