Weiterleitung der alten Foren-URLs zum Discourse

Ich versuche, von einem WordPress-basierten Forum zu Discourse zu migrieren.

Meine alte URL sah so aus:

https://example.com/question/questioncontent

Und in Discourse werden Themen mit folgender URI erstellt:

https://example.com/t/questioncontent

Ich habe also den gesamten Inhalt von meinem alten Forum in das neue Forum kopiert. Da ich nicht sehr technisch versiert bin und kein Risiko eingehen wollte, habe ich bei meinen etwa 18 Beiträgen keine Skripte verwendet, sondern den Inhalt allesamt manuell kopiert.

Meine Frage ist nun: Wie kann ich die Links meines alten Forums umleiten, die bereits in Suchmaschinen indexiert sind?

Ich habe die Permalink-Funktion für die Umleitung ausprobiert, aber es funktioniert immer noch nicht.

Habe ich etwas übersehen? Bitte leiten Sie mich irgendwo mit dem korrekten Verfahren an.

1 „Gefällt mir“

See admin -> customize -> permalinks. You can create a redirect from the 18 old URLs to their new topics.

4 „Gefällt mir“

I tried unfortunately they are not redirected

Any help? This is not working for me

1 „Gefällt mir“

I have written a plugin to do so.

Change the above to:
get '/question/:slug', to: redirect('/t/%{slug}')

2 „Gefällt mir“

Thanks will try and let u know

1 „Gefällt mir“

I cannot imagine why not, but it’s impossible to tell without more information about what you did. I cannot imagine why you’d need a plug-in, though. For 18 you can just create them by hand, though you could possibly use a permalink normalization to do them all at once.

Edit: permalink works only for incoming links, not links within discourse. What is usually done is to rewrite those links in the posts.

I was redirecting my old forum urls to discourse one. Dont know why its not working for me.

i wanted to confirm
suppose my old url is 1. forum.example.com/must-read-rules
and discourse one is 2. forum.example.com/t/must-read-rules/47

i have to enter this 1. in New field and 2 in destination field am i right?

Sry for dumb question!

You’d enter must-read-rules in the URL field , leave the “topic ID” selected, and put 47 in the topic ID field. Like this:

1 „Gefällt mir“

The redirect option under customize option is not working for me.

How can I make it work?

Are you trying to use it to redirect inbound links to discourse content, or to redirect links within discourse (i.e between pages).

1 „Gefällt mir“

Right! Permalink works only for incoming URLs. I bet this is the problem.

1 „Gefällt mir“

@pfaffman @Stephen Im migrating from wordpress to discourse. I m redirecting my old urls to discourse generated urls.

ex: forum.example.com/question/hey to forum.example.com/t/hey

Inbound links will be redirected by the permalinks feature. Internal links between posts will need to be corrected to reflect their new destination, permalink redirection won’t work there.

1 „Gefällt mir“

What are the possible ways to make it work?
the first url was my previous wordpress forum one and second url is my discourse one
How can i redirect successfully.

Can u please tell me how can i edit the code any guide? i installed the plugin but i didnt found specific area which u are referring to edit the slug?

1 „Gefällt mir“

Tried unfortunately not working :pensive:

You’ll have to fork the plugin.

1 „Gefällt mir“

Can I add multiple urls there?
Or only structure of url?