title: cURL not working with redirect URL
body: <p>I am trying to create a cURL script that will follow websites, even when a redirect takes place. For some reason my approach seems to work for most sites, but fail for redirects. </p>
  
  <p>I have been trying to troubleshoot this for quite some time, I appreciate any advice as to why this is not working properly.</p>
  
  <p>My goal is for the script to follow the redirect and get the content from the redirect URL, <code>http://www.chinooksailing.com/products/</code>.</p>
  
  <p>Thanks in advance!</p>
  
  <pre><code>$ch = curl_init();
  curl_setopt($ch, CURLOPT_URL, 'http://www.chinooksailing.com/');
  curl_setopt($ch, CURLOPT_HEADER, true);
  curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
  
  $content = curl_exec($ch);
  
  curl_close($ch);
  return $content;
  </code></pre>