Redirect URL with Nginx in Digital Ocean

Did you do a standard install or is flarum running on the same host as Discourse?

Did you use the flarum migration script to import your data? It doesn’t look like the flarum script handles permalink redirects. I cannot imagine how the redirect you suggest could possible work unless you have somehow contrived for the topic IDs in Discourse to match those in flarum.

If you somehow did that, there is a permalink normalization site setting that will do what you suggest. It would be something like

     /d\/(\d+)-(.*)/t\/\2\/\1/

But the asdasd section can be replaced with a -, as the slug is ignored for routing.

nginx is inside the docker container. You can see it if you

cd /var/discourse
./launcher enter app

changes that you make there will be destroyed when you build a new container. It’s possible to make changes to your app.yml that will modify the nginx config in the container when a new one is built. You can look at the templates in /var/discourse/templates for some examples.

2 Likes