Welcome! Log In Create A New Profile

Advanced

"[emerg]: pcre_compile() failed: missing terminating ]" in rewrite rule.

Grzegorz Sienko
May 12, 2010 05:16PM
Hi.

I'm trying to do some rewrite. My url is:
http://domain.tld/stream/file/{username}{crc_username}{hash-file}.{extension}
and I'm want it to rewrite it to different location, where files physically are.

location ^~ /stream/file/ {
rewrite
"([a-f0-9]{8})([a-f0-9]{8})([a-f0-9]{40})(\.[^\.\/\\]*)$?"
/files/$1.$2/$3$4 last;
alias /home/resources/upload/;
mp4;
}

and while testing configuration I got error:
[emerg]: pcre_compile() failed: missing terminating ] for character
class in "([a-f0-9]{8})([a-f0-9]{8})([a-f0-9]{40})(\.[^\.\/\]*)$?"

And I don't see why I missed one ] ? When I add ] to the end I got
error: pcre_compile() failed: missing terminating ).

Any help appreciate :)

--
Best Regards
Grzegorz Sieńko

_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx
Subject Author Posted

"[emerg]: pcre_compile() failed: missing terminating ]" in rewrite rule.

Grzegorz Sienko May 12, 2010 05:16PM

Re: "[emerg]: pcre_compile() failed: missing terminating ]" in rewrite rule.

Maxim Dounin May 12, 2010 05:52PM

Re: "[emerg]: pcre_compile() failed: missing terminating ]" in rewrite rule.

Grzegorz Sienko May 13, 2010 07:22AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 168
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready