2

I'm having some difficult with wildcard redirects for my firebase hosting:

I currently have a url setup like this: /post/123123 where 123123 is the id of the post. I want this to redirect to /post?q=123123.

I've tried this:

  "hosting": {
    "redirects": [ {
      "source": "/post/:postId",
      "destination": "/post?q=:postId",
      "type": 301
    }]
    "cleanUrls": true,
},

However, this doesn't do anything.

Is there anything that I am doing wrong?

Many thanks in advance.

  • Possible duplicate of [Firebase: Pass url Param in URL Rewrite](https://stackoverflow.com/questions/45122296/firebase-pass-url-param-in-url-rewrite) – Renaud Tarnec Sep 16 '19 at 19:23

0 Answers0