When a redirect is needed, include the query string.