Improve page routing

Fixes https://opbeat.com/starkast/wikimum/errors/10/#activity-8060d0ed664e4caeb148404f5eb0ed62 and https://opbeat.com/starkast/wikimum/errors/6/