0

我的 ZenPHOTO 1.4.5 画廊有以下 Apache 重写规则:

'<IfModule mod_autoindex.c>
    IndexIgnore *
</IfModule>
<IfModule mod_rewrite.c>
    RewriteEngine On  
    RewriteBase /  
    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^.*$ - [L]
    RewriteRule ^.*/?$    index.php [L,QSA]  
</IfModule>`

我需要能够将它与 Nginx 一起使用。

谁能帮我转换一下?

提前致谢!

4

1 回答 1

0

Right now, i am using the following rules it works for me.

location ~ \.(gif|jpg|png) {
  try_files $uri @img_proxy;
}
location @img_proxy {
  rewrite ^(.*)$ /index.php?$1;
}
location / {
  try_files $uri $uri/ /index.php?$uri;
}

Note: It works for latest ZenPHOTO 1.4.5 version and i didn't check old versions.

于 2013-07-04T03:02:53.843 回答