use http_build_query to wrap redir (if present)