Search code examples
firebasefirebase-hosting

Possible to rewrite base URL vs one with short ID added in Firebase?


I want to support https://example.com/7_8jkil (ie. a shortid) be handled by one page in my firebase app. I currently have it working as https://example.com/room/7_8jkil

I am unsure if its even possible given the pattern matching in Firebase rewrites.

Here is my current rewrite code:

    "rewrites": [
  {
   "source": "/room/**",
   "destination": "/room.html"
  },
  {
    "source": "**",
    "destination": "/index.html"
  }
]

Solution

  • Oddly enough I tried the following and its seems to work!

        "rewrites": [
      {
       "source": "/**",
       "destination": "/room.html"
      },
      {
        "source": "**",
        "destination": "/index.html"
      }
    ]