Forum Discussion

AlexS_yb's avatar
Icon for Cirrocumulus rankCirrocumulus
Mar 07, 2023

URL branching in pre request access policy



I have an access policy that is shared amongst a few VS in their own partitions.

the AP and per request policy exist in /common

and VS's in their own partitions utilise this.


I have URL branch object and I would like branch on the URL

i use the dialogue boxes and end up with something like this

expr {[mcget {perflow.branching.url}] contains ""}

This is mean to capture


But it might also capture something like



which is not what I want. Now as this is a shared policy how can I get the hostname associated with the VS

or how can I change it to match something like this regex



it would actually be nice if you could actually access just the URI - path of  {perflow.branching.url} if I could guarantee it was at the first /

so for completeness if

{perflow.branching.url} => https://<??> 

???? => /diag-sso  



2 Replies

  • Hi

    You could insert an iRule event where you have the option to match on URI and then set a flag. This flag can then be used in the policy to branch out.


    • AlexS_yb's avatar
      Icon for Cirrocumulus rankCirrocumulus

      it would be better if I can keep all of the code in once place. I was thinking to just use the advance setting on the expression and change from contrain to a regex test