Ghost Blog Redirect for WordPress Migration
☰ Table of Content
In my earlier post Lighttpd url.redirect and changing WordPress permalink structure, I talk about the issue when permalink structure is changed.
New Issue
When migrating from WordPress to Ghost, the permalink structure is changed again, from
| |
to
| |
Solution
Ghost development team provided a perfect and simple solution in version 0.11.4, the redirects.json. The official document is here.
redirects.json need to be placed in <Ghost root>/content/data/.
The redirects.json for my site is as follow
| |
The above will take care of the following redirects:
https://johnsiu.com/index.php/YYYY/MM/DD/<post>/tohttps://johnsiu.com/<post>/https://johnsiu.com/index.php/category/<tag>/tohttps://johnsiu.com/tag/<tag>/https://johnsiu.com/index.php/<post>/tohttps://johnsiu.com/<post>/
Done!! ✌️
John Siu
Update: 2020-08-28