# Remapping old imported forum permalinks to posts and topics?

**URL:** <https://meta.discourse.org/t/remapping-old-imported-forum-permalinks-to-posts-and-topics/52107>\
**Category:** Development\
**Created:** [27 Ottobre 2016, 4:20pm UTC](https://meta.discourse.org/t/remapping-old-imported-forum-permalinks-to-posts-and-topics/52107 "2016-10-27T16:20:01Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)\
**Post date:** [27 Ottobre 2016, 11:53pm UTC](https://meta.discourse.org/t/remapping-old-imported-forum-permalinks-to-posts-and-topics/52107/5 "2016-10-27T23:53:21Z")

</div>

I’ve got the mapping from the old post-ids to the Discourse post-ids figured out, and use it to re-write IPB quotes to `[quote="#username, post:#{postnum}, topic:#topicid}"]`, making those quotes appear like native Discourse quotes.

If there were a way to get Discourse would throw away the cruft after the topic URLs (e.g., allow a `.*` after the permalink), then I wouldn’t need to fuss with Nginx. Right now, links to topics work, but any link in the wild to a topic will 404. It shouldn’t be too hard to write the Nginx rule to drop the post-id part of the URLs, though.

---

_[View the full topic](https://meta.discourse.org/t/remapping-old-imported-forum-permalinks-to-posts-and-topics/52107)._
