title: Check 301 http response with curl
body: <p>I'm migrating a web site. And I need to do the migration of more than 600 old url to a new type of url
  with symfony routing and 301 permanent redirection.</p>
  
  <p>example of one of my url:</p>
  
  <pre><code>redirect_test-url:
      path: /test-url
      defaults:
          _controller: FrameworkBundle:Redirect:urlRedirect
          path: /category/test-url
          permanent: true 
  </code></pre>
  
  <p>The redirect seems to work. But I need to be sure that all my old url are redirected with a 301 redirect.
  I think I can do a script with php and curl to check all the url. But I don't know how can get the curl result.</p>
  
  <p>Here is my curl request:</p>
  
  <pre><code>curl https://local.dev -k 
  </code></pre>
  
  <p>But my terminal jut send me back html. </p>
  
  <p>How can I get the http status code response to store it in a database?</p>