Forum Discussion

3 Replies

  • I think your best bet is to set

    to a variable in the
    event, and then reference the variable in the
    event. That may work for you.

  • John_Alam_45640's avatar
    Historic F5 Account

    Variables are not shared between HTTP events and ACCESS events.

    The original landing uri is saved as a session variable,


    So from any APM event you can use

    [ACCESS::session data get session.server.landinguri]
    you will get the original URI. Since the policy runs at the start of a connection, this variable is probably what you are looking for.

    Having said that, he best way to pass the value of a variable between APM and LTM events is to stuff it into the APM policy session variable data structure.

        ACCESS::restrict_irule_events disable
    when HTTP_REQUEST {
       ACCESS::session data set session.http_uri [HTTP::uri]
        if { [ACCESS::policy agent_id] eq "do_it_now_or_never" } {
            set uri [ACCESS::session data get session.http_uri]


    • John_Alam_45640's avatar
      Historic F5 Account
      I should clarify some things: The string "do_it_now_or_never" is a label you enter in the VPE to identify the location within the flow chart where you called the iRule Event from. This is yours to define. Stuffing and retrieving a value is session variables data structure is done via the commands: "ACCESS::session data set" and "ACCESS::session data get".