title: nginx subdomain rewrite
body: <p>I need a nginx rewrite rule to rewrite from:</p>
  
  <p><code>http://some-keyword.example.com</code> to <code>www.example.com/keyword.php?keyword=$some-keyword</code></p>
  
  <p>while domain without <code>www</code> in front still rewrites to <code>www.example.com</code> and <code>www</code> isn't taken as a keyword.</p>
  
  <p>Please could you help me to solve this problem, how to write these two rules?</p>