please help me with follow rewrite rule.
digginchina
nginx-forum at nginx.us
Wed Oct 6 20:50:29 MSD 2010
here is the structure:
/images/thumbnails/
/watermark
i use follow rewrite rule to add a watermark on my pictures.
rewrite ^/images/(.*)\.jpg /wm/wm.php?$request_filename;
i found it will rewrite with images/*.jpg and image/thumbnails/*.jpg,
but actually i only wanna rewrite images/*.jpg, not subdirectories. then
i change it to:
rewrite ^/images/(.[^/])\.jpg /watermark/image.php?$request_filename;
my opinion is fit all character except "/" so that i can remove all
subdirectories from the rewrite rule.
but unfortunately, it doesn't work well, /images/*.jpg can't be rewrited
too.
is there anybody help me with this case?
thanks a lot.
regards
solo
Posted at Nginx Forum: http://forum.nginx.org/read.php?2,137829,137829#msg-137829
More information about the nginx
mailing list