title: How to make Zend Framework 2 work with nginx?
body: <p>I want to make Zend Framework 2 application to run within Nginx server. I could access the homepage, but I could not access any other modules. I found that Nginx needs a rewrite rule to access the URL such as domain/album. The question is how to convert the default <code>.htaccess</code> rules of Zend Framework 2 to Nginx rewrite rule? </p>
  
  <p>Here are the <code>.htaccess</code> rules:</p>
  
  <pre><code>RewriteEngine On
  
  RewriteCond %{REQUEST_FILENAME} -s [OR]
  RewriteCond %{REQUEST_FILENAME} -l [OR]
  RewriteCond %{REQUEST_FILENAME} -d
  RewriteRule ^.*$ - [NC,L]
  
  RewriteCond %{REQUEST_URI}::$1 ^(/.+)(.+)::\2$
  RewriteRule ^(.*) - [E=BASE:%1]
  
  RewriteRule ^(.*)$ %{ENV:BASE}index.php [NC,L]
  </code></pre>