allow slash in root->tree redirect

before #6117, only `/base_url/` worked,
after #6117, only `/base_url worked,
after this PR, both should work.
Merge pull request #6333 from minrk/tree-slash-redirect

allow slash in root->tree redirect