Use cURL for handling redirects