so, seems that the following is the most correct, (at least for me worked well so far) location ~ "^(/optionalwebappname)?/ProcessImageServlet.*$" { set $th ''; if ($request_uri ~ "^(.*)[\\?|&]type=th(&.*)?$") { set $th 'th_'; } rewrite ^(.+)$ http://static-dev.myhost.eu/$arg_hotel_id/$th$arg_filename break; expires 1d;by tmanolat - Nginx Mailing List - English
initially this worked well: (\x{386}-\x{3ff} for Greek chars) location ~ "^(/optionalwebappname)?/ProcessImageServlet.*$" { root /opt/myfilerepository/; rewrite ^(.+)$ http://static-dev.myhost.eu/$arg_hotel_id/$th$fn break; set $hid ''; set $filename ''; set $th ''; if ($request_uri ~ "^(.*)[\\?|&]hotel_id=([0-9]+)(&.*)?$") {by tmanolat - Nginx Mailing List - English
Dear Maxim, it works like a charm now. FYI I put in nginx.conf: ... if ($request_uri ~ "(*UTF8)^(.*)[\\?|&]filename=([% ,a-zA-Z0-9\x{386}-\x{3ff}_\-\.]+)(&.*)?$") { ... Kindest regards, Tilemahos Manolatos PS. @Weibin Yao: I would like to avoid "fixed" character lists, I wanted to use ranges of characters, so the above solution seems, in my opinionby tmanolat - Nginx Mailing List - English
Dear all, I try to implement some rewrites using regular expressions and my URIs will contain Greek characters. Trials of the REs are going ok when tested with pcretest: # pcretest PCRE version 8.10 2010-06-25 re> #^[\x{0386}-\x{03FF}]+$#8 data> bv No match data> Τηλέ 0: \x{3a4}\x{3b7}\x{3bb}\x{3ad} note the 8 modifier that actually tells PCRE to do a UTF-8 maby tmanolat - Nginx Mailing List - English