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
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
./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.
Then you need to modify or pay someone to modify the import script to make the permalinks. What you are trying to do is impossible. The topic ids are all different. If you have users already using the community now you’re either out of luck or will need to throw away their posts.
Oh. Sorry. The import_ids should be in the database. You can write a script to create the permalinks. You’ll need to look at some of the other import scripts for one that creates the redirects after the topics are imported rather than as part of the import topic function.