Added tests for #6156: test that correct urls are not redirected