add support for redirects.