1. Using the
According to manual: The
-L option will force
curl to retry the request on the new location if the server detects that the requested page has moved (marked with a Location: header and a 3XX response code).
To follow redirects use the command:
2. Limit the number of redirects
You are also able to limit the number of redirects using
--max-redirs parameter. By default, the limit is set to 50 redirects. To make unlimited redirections use