title: NGINX hashbang rewrite
body: <p>I'm wondering what a location or rewrite nginx directive for hashbang (#!) urls would look like. Basically routing all non hash-banged url's through the hashbang like a front controller. So:</p>
  
  <pre><code>http://example.com/about/staff
  </code></pre>
  
  <p>would route to </p>
  
  <pre><code>http://example.com/#!/about/staff
  </code></pre>
  
  <p>I'm unclear what the best technique here would be? Whether writing an if statement to check existence of the hashbang, or just a generic rewrite that filters all requests... </p>