Forum Discussion
Michael_Jenkins
Jul 29, 2015Cirrostratus
You could try something like this:
when CLIENT_ACCEPTED {
Allow access to APM specific pages (this may not be necessary for the my.policy page)
ACCESS::restrict_irule_events disable
}
when HTTP_REQUEST {
if { [HTTP::uri] equals "/my.policy" } {
log local0. "Path: my.policy"
log local0. " Access: '[ACCESS::policy result]'"
if { [ACCESS::policy result] equals "" } {
log local0. " Invalid request (user bookmark?)"
Redirect to the desired uri
HTTP::respond 302 Location "/"
return
}
}
}
If the user comes to the
my.policy
page and the policy result is empty, then their session hasn't started (it should be something like not_started
at this point I think).