Fix 301 redirect

Fix 301 redirect to use the Host of the redirect location.