Given that we would like to make the following rewriting (in both discovery and declarative context) - '/foo' to '/' - '/foo/' to '/' - '/foo/anything/else' to '/anything/else' We need to - force the presence of a leading '/' after rewriting as we may result in an empty uri path otherwise - exclude it from 'remaining' group See #1282 See #1359 See #1360