Forum Discussion
APM - close session with a custom response and redirect
I am trying to force close an APM session under certain circumstances. I am successful in closing the session, but when I attempt to do a response or redirect I get an error.
else {
log local0. "Match is $Match"
log local0.info "Logging off from portal"
send to somewhere else, hard coded for now
HTTP::redirect "http://www..com/"
ACCESS::session remove
HTTP::redirect "http://www..com/"
HTTP::respond 302 Location "http://www..com"
}
I keep getting the following error:
Jul 14 14:56:45 apm0 err tmm3[12064]: 011f0007:3: http_process_state_prepend - Invalid action:0x1090b1 (Client side: vip=/Common/vip_test profile=http addr=12.17.12.17 port=443 rtdom_id=0 client_ip=192.168.100.220)
If I leave the redirect or respond commented out - it closes the session just fine. Trying to redirect otherwise repond - it errors.
Any help would be appreciated.
2 Replies
- Kevin_Stewart
Employee
Try:
ACCESS::respond 301 Location "http://www..com" - Kevin_Stewart
Employee
Not sure what the rest of the iRule looks like, but the typical place to put this is in the ACCESS_ACL_ALLOWED (or _DENIED) event. You might want to just set a session variable in the iRule event that gets picked up in the later event.
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* 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