Updated to follow relative redirects, thanks @digininja