Improve http redirects