Add -L for cURL to follow 301 redirect.