Forum Discussion
mahir
Altostratus
Nov 26, 2017APM control URI
I would like to create an irules that allows me to control at the first opening of a session that the URI starts with a string / ABCDE / and after it redesigns the flow to the pool.the problem when I run the irules the content of the page does not download completely
when ACCESS_POLICY_AGENT_EVENT {
if { [ACCESS::policy agent_id] eq "CONTROL" } {
set uri1 [ACCESS::session data get session.server.landinguri]
get hash from URI
if { $uri1 starts_with "/HABCD/" } {
ACCESS::session data set session.custom.control_hash 1
} else {
ACCESS::session data set session.custom.control_hash 0
}
}
}
1 Reply
- Stanislas_Piro2
Cumulonimbus
Hi,
there are 2 preferred solution :
- use an irule in ACCESS_SESSION_STARTED event instead of ACCESS_POLICY_AGENT_EVENT.
ACCESS_SESSION_STARTED is executed at the beginning of the session.
Here is an example of how to filter on landinguri in this event. - configure a variable assign in VPE.
Here are examples of how to write variable assign expressions.
but the code you posted may not cause incomplete page.
you can try this variable assign:
session.custom.control_hash
expr {[mcget {session.server.landinguri}] starts_with "/HABCD/"} - use an irule in ACCESS_SESSION_STARTED event instead of ACCESS_POLICY_AGENT_EVENT.
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects