url.startsWith(prefix + '/')) {
      var prefixSegments = prefix.split('/')
      var versionSegmentIdx = prefixSegments.findIndex((segment) => segment === it.version)
      prefixSegments.splice(versionSegmentIdx, 1, it.url.split('/')[versionSegmentIdx])
      prefix = prefixSegments.join('/')
    }
    accum[prefix] = it
    return accum
  }, {})
  var returnTo
  var segments = pathname.split('/').slice(0, -1)
  while (segments.length > 1) {
    if ((returnTo = startPages[segments.join('/')])) break
    