[test] Test for retaining querystrings on redirects
[fix] Include querystrings in redirect urls