Redirect URL to another domain with same path

Hi, I try to use Redirect.json for redirect URLs.
I use this in redirect.json file
[{
“from”: “/([a-zA-Z\d.-]+)”,
“to”: “https://blog.anotherdomain.com/$1”,
“permanent”: true
}]
its redirect to another domain but in URL its printing $1 its unable to fetch URL path
please help me to solve this

Hey @Harpreet_Singh :wave:
Are you trying to redirect all the URLs? Maybe something like this would work:

[
  {
    "from": "^\/(?!content/images)(.*)",
    "to": "https://blog.anotherdomain.com/$1",
    "permanent": true
  }
]

Hi @DavidDarnes

Its redirecting to https://blog.anotherdomain.com/$1
in $1 there is no value and its redirect to 404

This may be due to the version of Ghost you’re using. This should work in the latest version of Ghost (3.27.0)