How to extract path from the uri

i have used extract variable policy ,to extract the path suffix and route rule to direct to a specified target basing on the path.

{request.proxy.pathsuffix}

{request.proxy.pathsuffix == “/Facebook/**”} Target1

What am i doing wrong ,because it is alwasy calling th default target instead of specified one. @Anilsagar

instead of request.proxy.pathsuffix, try proxy.pathsuffix in your Condition in the RouteRule.

You don’t need to explicitly extract this, as proxy.pathsuffix is already populated in a variable.

See the full list here: docs.apigee.com/api-services/reference/variables-reference

Thanks, Sean

{proxy.pathsuffix == “/Facebook”} I tried this did not work

Make sure the Conditional RouteRule is specified first, before the Default route rule, as they are evaluated top-to-bottom. Also, instead of using the == operator in the Condition, use the MatchesPath operator.