title: Convert htaccess rules to nginx rules
body: <p>I have these apache (htaccess) rules and I want to convert them to nginx rules. I have tried a lot of combinations but in vain.</p>
  
  <p>You have the rules below:</p>
  
  <pre><code>RewriteRule ^candybooru/_images/([0-9a-f]{2})([0-9a-f]{30}).*$  /candybooru/images/$1/$1$2
  RewriteRule ^candybooru/_thumbs/([0-9a-f]{2})([0-9a-f]{30}).*$  /candybooru/thumbs/$1/$1$2
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteRule ^candybooru/(.*)$ /candybooru/index.php?q=$1&amp;%{QUERY_STRING}
  </code></pre>