301 redirect to another domain

Hi guys,

I need to set yup 301 redirect from my ghost site Ghost Admin to a site hosted elsewhere. Here’s the code I’m trying to upload in json. It doesn’t work :( Help please !

    "from": "http://blog.wemaintain.com/",
    "to": "https://www.wemaintain.com/fr/blog",
    "permanent": true

Can you try making the from a relative path ("from": "/") :slight_smile:


Oh wow, it worked! Thanks so much for your help, I spent 4 hours googling on this before posting here :innocent:

1 Like

hey, I need a little bit more help :slight_smile:

I need to set up 2 redirects:

  1. domaine/en/text => first destination
  2. domaine/tag/text => second destination

I’m trying to use regex for this, it works on regex101, but shows as error on my json file. What am I doing wrong? Do I actually need regex for this? Thanks so much !

    "from": "/^en\S*/gm",
    "to": "destination1",
    "permanent": true

Can you try this:

	"from": "^\\/en/(.*)",
	"to": "destination1/$1"
}, {
	"from": "^\\/tag/*",
	"to": "destination2/$1"