You can use the (:any) placeholder to catch all routes after the domain and until the next slash.
Then try to find a page with that slug.
Note that if you happen to have duplicate slugs under different parent pages, such pages wouldn’t be accessible anymore or rather, your route than would only deliver the first match, e.g.
mydomain.com/blog/example-slug and mydomain.com/otherparent/example-slug
However, this shouldn’t be a problem if you just want your blog posts to be available without the blog bit.
The code you need would be basically like in the old Kirby 2 docs, adapted to Kirby 3:
That is totally working if I know the slug of the parent pages, but we want to have flat urls for every page.
By the way: For me it’s totally fine and logic how kirby works by default, and I think thats the way every website should, but those SEO People in my office think different
(Sorry, would have given a complete example, but writing code on a phone is really painful)
This obviously has to scan the whole website on every page load. Depending on the size of your website, this could be a problem for performance and, therefore, also for SEO