Could I redirect a post to other post?

I tried this:
Customize > Permalinks

# I tried to redirect from
# https://mydomain.com/t/test/1234
# to https://mydomain.com/t/test2/5678

# So I created in Customize > Permalinks
# URL:
/t/test/1234
# Type:
topic id
# Value:
5678

But topic_1234 is not redirected to topic_5678

In Discourse, permalinks are typically used to redirect from an old URL to a new one when migrating from another platform. They’re not typically used to redirect between topics within Discourse itself.

If you want to redirect users from one topic to another within Discourse, the best way to do this is to close the original topic and leave a note with a link to the new topic. This way, users who visit the original topic will see the note and can click the link to visit the new topic.

1 Like

It still did not redirect after I closed the old topic (/t/test/1234).

Sorry for the confusion. Closing the topic won’t automatically redirect users to the new topic. What it does is prevent further replies to the old topic.

The suggestion was to manually add a note to the closed topic, providing a link to the new topic. This way, anyone who visits the old topic will see the note and can follow the link to the new topic.

Here’s an example of what you might write in /t/test/1234:

This topic is now closed. Please continue the discussion here - https://mydomain.com/t/test2/5678.

1 Like

Is there anyway to write a RewriteRule?

RewriteEngine on
# RewriteRule (something here)

You can use permalinks to redirect one topic to another :+1:

Just make sure the old topic is in a public category, is deleted, and that you’re using an account to access it which doesn’t also have access to see deleted topics (so non-admin/mod or tl4 if you have tl4 delete posts and topics enabled).

5 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.