Have curl --follow the location of the things it fetches.