eGullet Posted September 24, 2020 Posted September 24, 2020 Over the years there have been many (many, many!) different ways of linking to specific comments. One way that used to work takes the form: {Base URL}/index.php?do=findComment&comment={comment ID} It is a tough one to map directly to a modern link because it doesn't have the Topic ID in it. I typically try to keep these old links alive by adding ModRewrite rules in .htaccess, and that particular older form was my go-to when the URL didn't contain the TID. So... fast forward to 2020, and v4.5, which no longer supports that style of link. Is there an equivalent? That is, I need a link to a post that doesn't require the topic ID (I'm trying to avoid fixing this with a custom plugin that looks up the TID, I'm hoping there is just some sort of link that I can plug straight into .htaccess).
Solution bfarber Posted September 24, 2020 Solution Posted September 24, 2020 I'm drawing a blank trying to think of a "normal" way to do this, but one option is to just fudge the topic URL. Pick a real topic id (any one, doesn't matter) and then do this: https://invisioncommunity.com/forums/topic/458741-a/?p=2832063 or to match your example {base url}/topic/458741-a/?p={comment id} The forum application will see the "p" parameter, look up the URL to that specific post and send you to the real URL.
eGullet Posted September 24, 2020 Author Posted September 24, 2020 @bfarber Excellent, that works well. I was worried that the underlying query would use that Topic ID, I'm glad to see it doesn't. Thanks!
clearvision Posted September 24, 2020 Posted September 24, 2020 (edited) Deleted. Edited September 24, 2020 by clearvision
Recommended Posts