Though your explanation makes sense and I understand the potential problem with loops, I’ve not noticed any importers that do this kind of replacement of internal links. I don’t want to write more code that generates a “bad import.” Can you point to an example of what the importer should have done and what the recommended way to see that old internal links continue to work after import to Discourse?
When I asked about this in October, permallink Normalizations seemed to be the answer (but I was concerned then with external sites linking in).
To remap the old IPB URLs to the new Discourse ones, you’d need to know the mapping of the IPB IDs to the Discourse IDs, right? Or are you suggesting that the old URLs be remapped to include another host name or path that would be handled by an external NGINX then do the redirects?
Edit: Actually, the IPB importer that I wrote does replace some internal links. When a post is quoted, I rewrite the post as Discourse Markdown
[quote="user, post:xx, topic:yyy"]
The stuff they said
Is Best Practice to identify all internal links and rewrite them?
Thanks for your help.