/rest/: switch to non-greedy regex to avoid trailing-slash errors