Hi,
Newbie with nginx, playing around with my vps.
My problem : i have an apache htaccess, and transforming it into nginx conf.
My goal : serve images at the appropriate size, depending on a cookie value, with 4 possible sizes.
I've got a problem on this part of the process :
- if the file is /img/size(320|480|768|1024)/foo, and if it's not present, then rewrite to a php sctip to generate the appropriate image (which would be served on next similar request)
I pasted my code here, Apache orignial file http://pastebin.com/bSAwiJm3 and nginx new file http://pastebin.com/wJPZcTWJ
nginx file :
lines 02 to 17 : redirect to cookie size
lines 18 to 21 : no cookie means redirect to max size
lines 22 to 27 : restrict to 4 authorized sizes
This works. My remaining problem, rewriting request to authorized sizes to the php script, if file not found.
Thanks