Forum Discussion
Alvin, Eric, Stanislas, Brett:
Try assigning this iRule to the SharePoint virtual server (if you are using the iApp template, you can attach it with the iApp and you won't need to disable strictness like you would if you edited the logout URI list manually):
when HTTP_REQUEST {
if { [string tolower [HTTP::uri]] contains "_layouts/15/signout.aspx" } {
ACCESS::session remove
HTTP::redirect https://[HTTP::header host]/vdesk/hangup.php3
}
}
mikeshimkus,
In the code I redirected to, this is what I did.
I have some comments about your irule:
As the URI always ends with /_layouts/15/signout.aspx, it is better to use ends_with instead of contains.
When the browser hit the URI /vdesk/hangup.php3 , the session is closed. there is no need to close the session in the irule.
ACCESS_ACL_ALLOWED is better than HTTP_REQUEST. Unauthenticated requests do not need to be redirected to the logout uri.
And why lots of irules contains Host in redirect?
The irule is :
when ACCESS_ACL_ALLOWED {
if { [string tolower [HTTP::path]] ends_with "_layouts/15/signout.aspx" } {
ACCESS::respond 302 noserver Location "/vdesk/hangup.php3"
}
}