Hosting redirect buggy regex pattern

105 views
Skip to first unread message

Patricio Stegmann

unread,
Nov 10, 2020, 5:21:39 AM11/10/20
to Firebase Google Group
Hello,
I am trying to build a simple redirect hosting rule. I want to redirect for example this:

https://app.mysite.com/?v=something&id=someid
to

only if the query string has that v parameter only, so if v query parameter is not on the url, stay on the initial url.

I tried 
{
      "regex": "\/\\?v=(.*)",
      "destination": "https://www.blable.com.br/?v=:1",
      "type": "301"
}
or other reg patterns like ^/?v=(.*)$ and combinations with backlashes ... I can't make this work ! Anyone can help me ?

Michael Bleigh

unread,
Nov 10, 2020, 9:27:29 AM11/10/20
to Firebase Google Group
Currently redirect regexes work only on paths, not query strings, so it's not possible to capture and redirect based on query parameters.

If this is important functionality for your app, I'd recommend filling a feature request so we can track it.

--
You received this message because you are subscribed to the Google Groups "Firebase Google Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebase-tal...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-talk/6bb3ea3e-a30e-4e73-83aa-af71efea7d8cn%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages