title: Nginx rewrite without 301 code
body: <p>I want to redirect all queries to my site to https protocol.
  My config is:     </p>
  
  <pre><code>    server {
      listen  80;
      server_name addons.vkzvuk.ru;
      server_name www.vkzvuk.ru;
      server_name vkzvuk.ru;
      rewrite ^ https://vkzvuk.ru$request_uri? permanent; }
  </code></pre>
  
  <p>When I make curl request <strong>curl vkzvuk.ru</strong> it returns html:</p>
  
  <pre><code>&lt;h1&gt;301 Moved Permanently&lt;/h1&gt;
  </code></pre>
  
  <p>So, a lot of internet services can't show me google pr for example.</p>
  
  <p>On the other hand, "curling" twitter and facebook returns empty result. How I can tune nginx to get the same behavior?</p>