title: curl to follow location along with POST
body: <p>I'm posting a request with POST data using cURL to a PHP script here: <a href="http://localhost/example/index.php" rel="nofollow">http://localhost/example/index.php</a></p>
  
  <p>How do I hide index.php and just post to <a href="http://localhost/example" rel="nofollow">http://localhost/example</a> ?</p>
  
  <p>I've tried just posting there, but I get a 301 Moved Permanently header, and if I set CURLOPT_FOLLOWLOCATION to TRUE, the request follows, but seems to lose the POST data - I get nothing at the far end using this file_get_contents('php://input').</p>