Welcome! Log In Create A New Profile

Advanced

Re: problem with PCRE matching, utf-8, Greek, rewrite

mat h
September 24, 2010 09:48PM
When attempting to use *UTF8 I always receive.
[emerg]: pcre_compile() failed: (*VERB) not recognized in
"(*UTF8)^/([^/^.]+)(?:/?)(?:index([0-9]*)\.html?)?$" at
"8)^/([^/^.]+)(?:/?)(?:index([0-9]*)\.html?)?$" in
/etc/nginx/sites-enabled/nexusddl.com:85

Yet my PCRE has UTF-8 support, tested it in PHP (both nginx and php
compiled against PCRElib included in debian)

On Thu, Sep 23, 2010 at 7:12 PM, tmanolat <nginx-forum@nginx.us> wrote:
> initially this worked well: (\x{386}-\x{3ff} for Greek chars)
> [code]
>                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]+)(&.*)?$") {
>                                set $hid $2;
>                        }
>                        if ($request_uri ~ "(*UTF8)^(.*)[\\?|&]filename=([%
> ,a-zA-Z0-9\x{386}-\x{3ff}_\-\.]+)(&.*)?$") {
>                                set $fn $2;
>                        }
>                        if ($request_uri ~ "^(.*)[\\?|&]type=th(&.*)?$") {
>                                set $th 'th_';
>                        }
>                        rewrite ^(.+)$ http://static-dev.myhost.eu/$hid/$th$fn break;
>                        access_log  logs/site-pis.log  main;
>                        expires           1h;
>                }
>
> [/code]
>
>
> however, later I found this to work better, including of course utf8
> arguments - you would better check this out first... much more elegant
>
> [code]
>                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;
>                }
> [/code]
>
> Posted at Nginx Forum: http://forum.nginx.org/read.php?2,104357,133276#msg-133276
>
>
> _______________________________________________
> nginx mailing list
> nginx@nginx.org
> http://nginx.org/mailman/listinfo/nginx
>
_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx
Subject Author Posted

problem with PCRE matching, utf-8, Greek, rewrite

tmanolat July 01, 2010 11:33AM

Re: problem with PCRE matching, utf-8, Greek, rewrite

Maxim Dounin July 01, 2010 01:18PM

Re: problem with PCRE matching, utf-8, Greek, rewrite

tmanolat July 02, 2010 03:48AM

Re: problem with PCRE matching, utf-8, Greek, rewrite

flickhorn September 23, 2010 03:46AM

Re: problem with PCRE matching, utf-8, Greek, rewrite

tmanolat September 23, 2010 05:12AM

Re: problem with PCRE matching, utf-8, Greek, rewrite

mat h September 23, 2010 04:02AM

Re: problem with PCRE matching, utf-8, Greek, rewrite

mat h September 24, 2010 09:48PM

Re: problem with PCRE matching, utf-8, Greek, rewrite

Maxim Dounin September 25, 2010 05:20AM

Re: problem with PCRE matching, utf-8, Greek, rewrite

tmanolat September 25, 2010 10:46AM

Re: problem with PCRE matching, utf-8, Greek, rewrite

Weibin Yao July 01, 2010 10:16PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 305
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready