Include query string on redirect

The query string was being trimmed off when redirected which is
incorrect.