I try to do this with changing the redirects.json file and upload this file in labs. More about redirect you can read here: Implementing redirects in Ghost
Can you mod_rewrite url in ghost.io and is this possible with redirects or not?
The ghost support did some testing on this, and including a redirect that contains a URL with a parameter in the “to” is not something that is supported yet. This is a limitation where ghost is aware of, however they do not have an ETA yet on when support for this would be implemented.
I note that you created a redirects.yaml; I use redirects.jsonwith URLs, but only because I have changed domains, and have two instances of Ghost running; one simply redirects to the other (I use regex, but back references.)
If Ghost uses the same domain as your previous site, then there’s no need for the domain in the redirect anyway.
The following is an example from the official documentation, so you should be able to achieve what you want.
Yes this code is working fine, I use this for redirecting content after the id/* to one page
301:
^\/id\/([a-z0-9-]+)\/$: /$1
It is not possible to redirect tour/123 to tour/?id=123 inside the ghost website when tour/123 is no page. I load content from an API into tour/?id=123 , tour/?id=124, tour/?id=125,… but my goal was to create better URI’s. like tour/123, tour/124 or tour/125.
Sorry, I thought the objective was to redirect tour/?id=123 to tour/123.
You can only redirect successfully if a page / post exists. Indeed, I thought you were recreating pages in Ghost and wanted the old URL to point to the new location.