Member
Member
southdreamz   2013-07-01, 19:13
#1

I have installed ZenPHOTO 1.4.5 on my local machine(NGINX) and i enabled mod rewrite option on ZenPHOTO admin.

I try to convert new htaccess rule using http://winginx.com/htaccess, but it does't work.

Then i tried try_files $uri $uri/ /index.php?$uri, it works for album but not images.

Where can i get correct code.

Member
Member
sbillard   2013-07-01, 19:46
#2

Hopefully our project manager will notice your question since he will have to make the same NGINX rewrite rules for our website when we install 1.4.5 on it (probably tomorrow). But if you have an old set of NGINX access rules working for the 1.4.4 release they will continue to work with 1.4.5. (Of course they are mostly redundant.)

Basically what you need to get NGINX to do is redirect anything that is not directly accessing a file on the file system to the zenphoto index.php script. http://docs.dotcloud.com/guides/nginx/

Also note that where you place these rules is different for NGINX than for Apache. The converter seemed to produce a reasonable looking rule, so maybe you have not placed in in the correct location. http://docs.dotcloud.com/guides/nginx/

Member
Member
southdreamz   2013-07-01, 20:28
#3

Thanks for your information!

I tried with the following rules, it woks fine 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;

}

`

  
Powered By MyBB, © 2002-2026 MyBB Group.
Made with by Curves UI.