nginx重写竹发票的规则

我只是从Apache的networking服务器迁移到Nginx,我不能让.htaccess转换正常工作。 我试图使用的应用程序是竹发票[ http://bambooinvoice.org/ ],它带有一个默认的.htaccess,看起来像这样:

RewriteEngine on RewriteRule ^$ /index.php [L] RewriteCond $1 !^(index\.php|img|css|js|robots\.txt|favicon\.ico|update\.php|install\.php) RewriteRule ^(.*)$ /index.php/$1 [L] 

任何人都可以build议如何将这套重写规则翻译成Nginx格式? 我没有任何运气..

尝试这样的事情:

 location ~* (index\.php|img|css|js|robots\.txt|favicon\.ico|update\.php|install\.php) { try_files $uri =404; } location / { try_files /index.php$uri; } 

那场比赛似乎有些过分宽容, 在path或文件名的任何地方对“img”,“js”或“css”的任何请求都会捕获静态内容规则。

现在有一个名为Apache2Nginx的工具。 它可以帮助将configuration文件从Apache迁移到Nginx。 https://github.com/nhnc-nginx/apache2nginx/wiki/Welcome-to-Apache2Nginx