keep query string when redirecting in rewrite middleware