简体   繁体   English

NGINX是否支持PCRE2扩展替换处理?

[英]Does NGINX support PCRE2 Extended replacement processing?

I need to do some really complex rewrites and I would like not to have to repeat myself too much.我需要做一些非常复杂的重写,我不想重复自己太多。 PCRE2 conditional substitutions would allow me to do so, but I can't seem to make them work in nginx. PCRE2 条件替换允许我这样做,但我似乎无法让它们在 nginx 中工作。 Is it just not supported or am I doing something wrong?它只是不支持还是我做错了什么?

These are the rewrites I'd like to unify.这些是我想要统一的重写。

    rewrite /intro/(es|en)-(es|uk)/pageA /$1-$2/pageB/;
    rewrite /intro/(es|en)_(es|uk)/pageA /$1-$2/pageB/;
    rewrite /intro/(es|en|uk)/pageA /$1/pageB/;

No, it does not.不,不是的。 nginx currently supports only the original PCRE library. nginx 目前只支持原 PCRE 库。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM