title: Basic Nginx rewrites
body: <p>What would be the best equivalent to this Apache2 rewrite in nginx?</p>
  
  <pre><code>RewriteRule ^programmes/([A-Za-z0-9])? /index.php/programmes/?alpha=$1 [QSA,L]
  </code></pre>
  
  <p>I've tried the following but it doesn't seem correct (and doesn't work :P)...</p>
  
  <pre><code>location ~ ^programmes/([A-Za-z0-9])? {
      rewrite ^programmes/(.*)$  /index.php/programmes/?alpha=$1  break;
  }
  </code></pre>
  
  <p>Any help would be gratefully received</p>