Just upgraded from v2.0.0 to v2.2.0 and I am trying to get my head around the new rewrite V2 syntax.
That syntax has apparently changed in a more condensed way in v2.2.0. Is that new syntax more “canonical” and is it here to stay or should I stick with the “old” v2.0.0 syntax? Just curious.
sample URI to rewrite
from /bird-cards/foo_bar to /bird-cards/foo-bar
working in v2.0.0 and above
@underscore {
path_regexp u ^/bird-cards/([^_]+)_(.+)$
}
rewrite @underscore /bird-cards/{http.regexp.u.1}-{http.regexp.u.2}
only works in v2.2.0 (and maybe in v2.1.0, not tested)
@underscore {
path_regexp u ^/bird-cards/([^_]+)_(.+)$
}
rewrite @underscore /bird-cards/{re.u.1}-{re.u.2}
or, even shorter
@underscore path_regexp u ^/bird-cards/([^_]+)_(.+)$
rewrite @underscore /bird-cards/{re.u.1}-{re.u.2}