We had a similar issue. Rewriting the url to a local site was no problem, but rewriting to an external site gave a bad gateway error.
We do have an internal proxy (the proxy you also set in IE to visit external sites). Setting this same proxy in the ARR reverse proxy page fixed our issue.