Raise RedirectException on 301 and 307 errors.