handle non-root base urls