Remova a porta de redirect
ou replace-value
http-request replace-value Host (.*):7777
http-request redirect location https://%[req.hdr(Host)]:9999%[capture.req.uri] if is7777
OR
http-request replace-value Host (.*):7777 :9999
http-request redirect location https://%[req.hdr(Host)]%[capture.req.uri] if is7777