title: How to test an HTTP 301 redirect?
body: <p>How can one easily test HTTP return codes, like, say, a 301 redirect?</p>
  
  <p>For example, if I want to "see what's going on", I can use <em>telnet</em> to do something like this: </p>
  
  <p>... $ <strong>telnet nytimes.com 80</strong></p>
  
  <pre><code>Trying 199.239.136.200...
  Connected to nytimes.com.
  Escape character is '^]'.
  </code></pre>
  
  <p><strong>GET / HTTP/1.0</strong></p>
  
  <p><strong>(enter)</strong>  </p>
  
  <p><strong>(enter)</strong></p>
  
  <pre><code>HTTP/1.1 200 OK
  Server: Sun-ONE-Web-Server/6.1
  Date: Mon, 14 Jun 2010 12:18:04 GMT
  Content-type: text/html
  Set-cookie: RMID=007af83f42dd4c161dfcce7d; expires=Tuesday, 14-Jun-2011 12:18:04 GMT; path=/; domain=.nytimes.com
  Set-cookie: adxcs=-; path=/; domain=.nytimes.com
  Set-cookie: adxcs=-; path=/; domain=.nytimes.com
  Set-cookie: adxcs=-; path=/; domain=.nytimes.com
  Expires: Thu, 01 Dec 1994 16:00:00 GMT
  Cache-control: no-cache
  Pragma: no-cache
  Connection: close
  
  &lt;!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"&gt;
  &lt;html&gt;    
  &lt;head&gt;      
  ...
  </code></pre>
  
  <p>Which is an easy way to access quite some infos.</p>
  
  <p>But now I want to test that a 301 redirect is indeed a 301 redirect.</p>
  
  <p>How can I do so?</p>
  
  <p>Basically, instead of getting a <em>HTTP/1.1 200 OK</em> I'd like to know how I can get the 301?</p>
  
  <p>I know that I can enter the name of the URL in a browser and "see" that I'm redirected, but I'd like to know what tool(s) can be used to actually really "see" the 301 redirect.</p>
  
  <p><em>Btw, I did test with a telnet, but when I enter www.example.org, which I redirected to example.org (without the www), all I can see is an "200 OK", I don't get to see the 301.</em></p>