handle http redirects