I recently managed to migrate my site from an old custom platform to Discourse successfully. However, I’m now facing the challenge of importing permalinks/redirects to the new Discourse topics. I have the IDs of all posts created in Discourse and I’m exploring options to import these redirects via API or command lines, as manually importing them due to the large amount is not feasible.
Could anyone please advise if there are any methods or tools available to efficiently import redirect links to the new Discourse topics? Your insights and suggestions would be greatly appreciated.
If your migration was based on an import script then topics (and probably posts) include an import_id custom field. You can then use those custom fields, Permalinks, and SiteSetting.permalink_normalizations to make redirects.
Thank you, Jay, for your response. Instead of using the import script for migration, I opted for API integration due to the custom structure. I developed a Python script to import posts using the API, and I have successfully fetched new topic IDs for each topic. Despite importing old URLs with new topic IDs/URLs across approximately 6k pages, none of the mappings are functioning as expected. Could you please advise on what I might be missing and how to rectify this issue? Your guidance would be greatly appreciated.