Appending query_string to the URI when redirecting on HTTP error