Redirect after APM completes to original uri
Greetings F5 Guru's! I have a bit of a dilemma we would like to preserve the landinguri for users for a specific site, and after successful authentication redirect them to the original uri they requested. This seems like it would be easy but I have been working on it for days and cannot seem to get the right combination of events etc...
Any help / tips / ideas would be greatly welcomed and appreciated - here is the irule:
using ACCESS_SESSION_* events to keep it from firing more that once only want to control the initial redirect out of the policy Also tried ACCESS_SESSION_COMPLETED
when ACCESS_SESSION_STARTED {
`set landing_uri [ACCESS::session data get "session.server.landinguri"]
log local0. "iRULE REDIRECT STARTING"
store original server name
set landing_server [ACCESS::session data get "session.server.network.name"]
log local0. "Current host: $landing_server"
NOTE: if block was trying to use HTTP::host - not valid TCL errors
if { $landing_server equals "some.site.com" } {
ACCESS::session data set session.server.landinguri $landing_uri
NOTE: tried to use HTTP::redirect and also tried to set location
Cannot seem to use HTTP within this context
} else {
log local0. "iRULE REDIRECT DID NOTHING - No match for site"
}
}
Comments are left in for debug, I can see its trying to work, since I cannot seem to use HTTP options like redirect or uri - I cannot seem to get it done.
Any ideas? Thanks for your time and consideration!