在nginx,htaccess上韭菜

你好,即时尝试设置韭菜Nginx的,有人可以帮我转换htaccess的吗?

Options +FollowSymLinks IndexIgnore */* DirectoryIndex index.php <IfModule mod_rewrite.c> RewriteEngine on # if a directory or a file exists, use it directly RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d # otherwise forward it to index.php RewriteRule . index.php?__chive_rewrite_on=1&%{QUERY_STRING} RewriteRule ^$ index.php?__chive_rewrite_on=1&%{QUERY_STRING} </IfModule> 

如果你在一个子目录“韭菜”中安装韭菜,请执行以下操作:

 location /chive/ { try_files $uri chive/$uri/ /chive/index.php?q=$uri&$args; } 

没有子目录:

 location / { # ... existing options ... check twice! try_files $uri $uri/ /index.php?q=$uri&$args; } 

根据http://wiki.nginx.org/HttpCoremodulee ,它可以使用$ query_string而不是$ args 。 (它的意思是:“除了这个变量是只读的,它和$ args一样”)。

伟大的项目从那时起就出现
https://github.com/perusio/chive-nginx