title: nginx path rewrite
body: <p>What I'm getting is:</p>
  
  <pre><code>/index.php/rest/item/1
  </code></pre>
  
  <p>However, it should be going to:</p>
  
  <pre><code>/rest/item/1
  </code></pre>
  
  <p>How can I rewrite every request from /index.php/rest/ to /rest/ ?</p>
  
  <p>Thanks!</p>
  
  <p><strong>Edit:</strong>
  It seems to only work if I make it a redirect:</p>
  
  <pre><code>rewrite ^/index.php/rest/(.*)$ /rest/$1 permanent;
  </code></pre>
  
  <p>If I use "break" or "last" it 404's on me, any idea? I'm using Gallery3, which is written on php's Konoha framework.</p>