XenforoからDiscourseへのリダイレクト

Xenforo掲示板では、リンクは次のように表示されます。

カテゴリの場合:
https://example.com/forums/category.1234/
/forums/category-name.ID/

投稿の場合:
https://example.com/threads/thread-name.1234/
/threads/thread-name.ID/

残念ながら、スラッシュとドットの数から推測すると、Discourse パネル (/admin/customize/permalinks) に追加した後、リダイレクトが機能しないようです。これを修正して適切なリダイレクトを作成する方法はありますか?

permalink_normalization というサイト設定で対応できます。

「いいね!」 2

また:

「いいね!」 2

ありがとうございます!

私のケース(XenForo)でのパーマリンク正規化のための正規表現は以下の通りです。

https://example.com/threads/thread-name.1234/
/(threads)\\/(.*?)([0-9].*)?$/threads/\\3

https://example.com/forums/category.1234/
/(forums)\\/(.*?)([0-9].*)?$/forums/\\3


スレッド名またはカテゴリに数字が含まれる場合は、こちらを使用してください。

/(threads)\\/(.*?\\.)([0-9].*)?$/threads/\\3

/(forums)\\/(.*?\\.)([0-9].*)?$/forums/\\3

「いいね!」 2

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