Thank you for your answer Arjan. I went in that direction in the end.
For posterity, here's what I did briefly for people that have the same problem:
- I switched to content tree-based routing in the settings.
- Then, I reviewed the custom routing code that was querying Kentico for the correct content based on the node alias path or document name path and determined which controllers were using this.
- For those controllers, I used the attribute
RegisterPageRouteAttribute as described here.
- If you were passing the node alias path as a parameter of a method, you can replace that by injecting
IPageDataContextRetriever and call