Technical Forum
Ask questions. Discover Answers.
cancel
Showing results for 
Search instead for 
Did you mean: 

APM Redirect Based on Decision Box Choice

TJMohr_289776
Nimbostratus
Nimbostratus

Hello everyone,

I'm having some trouble figuring out the best way to solve this problem. We have a Citrix deployment using APM, but depending on a choice made in a decision box earlier in the APM flow, the user needs to be redirected to a different URI. It can't be all users of the APM profile, only users who are now on the bottom fork of the APM flow.

Decision 1 - https://www.example.com/Citrix/XenApp1

Decision 2 - https://www.example.com/Citrix/XenApp2

I've tried to figure out the syntax for the APM iRule agents, but that doesn't seem to like using the following when starting the iRule with "

when
ACCESS_POLICY_AGENT_EVENT {`" section.

   if { [HTTP::uri] == "/" } {
        log local0. "Redirecting to /Citrix/XenApp2/"
        ACCESS::respond 302 Location "https://[HTTP::host]/Citrix/XenApp2/"
    }

Any assistance would be greatly appreciated!

Thank you,

-TJ

2 REPLIES 2

Stanislas_Piro2
Cumulonimbus
Cumulonimbus

Hi,

you can use this irule without any irule event (not tested).

when ACCESS_POLICY_COMPLETED {
    if {[ACCESS::session data get session.server.landinguri] equals "/"} {
        if {[ACCESS::session data get session.decision_box.last.result]} {
            ACCESS::session data set session.server.landinguri "/Citrix/XenApp1/"
        } else {
            ACCESS::session data set session.server.landinguri "/Citrix/XenApp2/"
        }
    }
}

this will change the redirect after authentication to the expected URI

The-messenger
Cirrostratus
Cirrostratus

I have a similar situation to this but want to direct users that select/login to a specific domain. https://devcentral.f5.com/s/feed/0D51T00006i7hMvSAI.