Http redirects

fix for #244 

also has tests!