{R:0}
is the entire input string, which includes
{R:1}
and the host.
{R:1}
matches the entire URL after
/api/
. That ends with
three
, not
resttest
, so you end up adding
.pb
in the wrong place.
Try:
- Pattern:
^api/([^/]+)/(.*)$
- Rewrite URL:
api/{R:1}.pb/{R:2}