Redirect with dynamic links

I am trying to do redirection on my Ghost website to a sub-domain of my website which has another application hosted there,

I am having the below redirect code on Ghost:

    "from": "^\\/game(\\/?)$",
    "to": "",
    "permanent": false

When I go to,
I will be redirected to

When I go to,
it will go to a 404 page.
But when I go to,
I will be redirected to

Is there something wrong on the redirection code above ?

  • Ghost version 3.41.9

Thank you!

Try this:

        "from": "/game/(.*)",
        "to": "https://your.awesome.domain/room/$1"

Couple of resources as well:

  • Docs
  • redirects.json from the Ghost tests
1 Like

Thank you so much. It works perfectly now.

1 Like