Preserve query parameters on redirect