Discourse to WordPress redirect questions

Permalink.create(url: ‘/discussion/12345’, external_url: ‘http://archived.example.com/discussion/12345’)

I trying:

Permalink.create(url: 'https://hoidap.cheng.vn/t/cach-cua-do-nu-bao-binh-don-gian/70', external_url: 'https://cunghoangdao.info')

And bolth

Permalink.create(url: '/cach-cua-do-nu-bao-binh-don-gian/70', external_url: 'https://cunghoangdao.info')

But not working.

I click link https://hoidap.cheng.vn/t/cach-cua-do-nu-bao-binh-don-gian/70 dont redirect.

Can you help me @neil
Thank so much!

Are you trying to redirect an existing Discourse topic to an external URL? That’s not what permalinks are designed to do. I’m pretty sure that you can’t redirect anything under /t.

If you want people who visit https://hoidap.cheng.vn/t/cach-cua-do-nu-bao-binh-don-gian/70 to be redirected to https://cunghoangdao.info then I think your best bet is to edit the post and tell people to click the link to go to the other site.

3 Likes

I see @neil say :slight_smile:

If you want some urls to redirect away from Discourse, you can do so by setting external_url
It mean i can redirect from discourse to external URL?

I change platform from Discourse to Wordpres, I want redirect all post (discourse) to Wordpress site, how can do it?
Please suggest for me, thank so much :blush:

You get the new platform to do the redirects.

3 Likes

Can you explain more?
Now i want copy all post from discourse to new wordpress site and i will redirect 301 link,article
… from discourse to wordpress site for without ranking and 404.
Discourse dont support redirect to other platforms.
So what can I do?
Thank for @pfaffman

If you are moving to WordPress then you ask a WordPress forum how to do it.

2 Likes

i will move all post from discourse to wordpress by manual, i can do it.But i dont know redirect all articles link from discourse to wordpress site.
Because i dont want lost ranking after switching.

Even if you use 301’s there will be an impact to your search ranking, it’s unavoidable. Google did say back in 2016 this wouldn’t have any effect but there are plenty of examples of it doing exactly that.

Anyhow, you don’t need Discourse to do the redirects for you, just a list of the post URLs you’re redirecting (or all URLs, if you so wish) and a dumb apache instance with a very large .htaccess crammed with redirects. You can either pull the list of pages to redirect from Google Webmaster tools, which is effectively what already sits in search and would be pointed your way, or hit your Discourse instance with a tool like Xenu, crawling only internal links.

2 Likes

So i will remove discourse forum and creat apache/nginx server for domain and redirect link on .htacces/.config.

I dont want duplicate content bettwen forum and wordpress so i think redirect 301.