I’m a newbie with Ghost and just transferred my most important posts to it. As I want to get rid of all the old WP Stuff, I just copied the Article in Post and Pages in Ghost. My question is now related to Redirect
My old blog is running under https://xzy.net/**blog**. In Ghost I would like to have my Posts in the folder /magazin
How can I achieve this without loosing any seo ranking in Google? Is implementing a redirect the right thing in this case?
I’ll will also use tags. Does this have any influence in the structure of the url?
The second question related to this is what happend to old URL which will not exist anymore in the near future? Will those links automatically going to a 404 page? If not how can I set this up?
Sorry for the silly questions. I read both articles but I didn’t get it how to do it properly in my case.
Thank you so much for your help in advance. It’s really appreciated!
Reto
In order for redirects to work as you expected you’re going to need to put your Ghost site at xyz.net and then setup redirects that pattern match /blog/ urls and redirect them to /magazin/. Tags have their own urls, do you have tag pages that you want to redirect as well? Those can be done in a similar manner. The tutorial page you linked to explains about the use of regex, check out that link for for more information.
Basically I have just to change the path in this file, which I found already in Settings/Lab.
{
"from": "/https://xyz.net/blog/" ,
"to": "/https://xyz.net/magazin/",
"permanent": true
}
I assume, that every post needs to have the tag "magazin". Thats it?
Great platform. I love Ghost already!
Thanks
Reto
The first item deals with the root page, the second deals with all items under that path.
By default Ghost places all posts under the root, and tags won’t add the prefix of /magazin/ to post urls. Check out our documentation on routes.yamlGhost Themes - Dynamic URLs & Routing You’ll probably want to do something like this:
collections:
/:
permalink: /magazin/{slug}/
template: index
This will adjust the default url of posts to be prefixed with /magazin/. Hope this helps!
I tried this in the meantime. If I replace your code in routes.yaml every single click is going to a 404 page. It doesn’t matter if I’m coming from google or try to open a post internaly.
I switched back to the original code in the file:
routes:
collections:
/:
permalink: /{slug}/
template: index
Additional question. I plan to use another tag. I learned that there is one main tag in Ghost. Which is for me magazin. I have now my posts added first magazin and in some post as second tag reisetipps.