This User Script called Fediverse Redirector auto-redirects all Community, Post, and User pages to your home instance. It works well.
-
Just click install on that page - it will be added to TamperMonkey (or similar).
-
Then click settings (under the script) and enter your home lemmy instance.
And to directly answer your question: the raw code is visible in that repo, so you could explore how the post
redirect query was constructed.
I love the joy you feel from the appearance of a monarch - knowing what that signifies.
And I love the way you study the overall water channel.