Forum Discussion

Damon_Delvechio's avatar
Damon_Delvechio
Historic F5 Account
Jul 06, 2016
Solved

OWA Timeout, Redirect to Logon Page, not BIG-IP Logout page, iRule?

Hello Community,

 

I am looking for an iRule or a way to redirect to the Logon Page when a user session timesout, (specifically for OWA) instead of sending them to the BIG-IP logged off page.

 

I know little about writing iRule (working on getting taking the class), I can read and understand the basics but of course that is like any foreign language :-)

 

I have searched around and have not really found anything, any pointers would be greatly appreciated! Thanks in advance!

 

Thanks!

 

Damon

 

  • Hi,

    The APM logout URI is /vdesk/hangup.php3

    You can write an irule to change the behavior when you reach this URI. For example :

    when CLIENT_ACCEPTED {
        ACCESS::restrict_irule_events disable
    }
    
    when HTTP_REQUEST {
        if { [HTTP::uri] eq "/vdesk/hangup.php3" } {
            if { ([ACCESS::session exists -sid $apm_cookie]) } {
                ACCESS::session remove
            }
            set uri "/mystartinguri"
            HTTP::respond 302 noserver "Location" "$uri" "Cache-Control" "no-cache, must-revalidate" Set-Cookie "MRHSession=deleted;expires=Thu, 01-Jan-1970 00:00:10 GMT;path=/" Set-Cookie "LastMRH_Session=deleted;expires=Thu, 01-Jan-1970 00:00:10 GMT;path=/"
        }
    }
    

    You can replace "/vdesk/hangup.php3" by your own logout URI.

    You also have to set the correct landing URI. By default, you should set "/" but maybe you have defined a custom one.

4 Replies

  • Hi,

    The APM logout URI is /vdesk/hangup.php3

    You can write an irule to change the behavior when you reach this URI. For example :

    when CLIENT_ACCEPTED {
        ACCESS::restrict_irule_events disable
    }
    
    when HTTP_REQUEST {
        if { [HTTP::uri] eq "/vdesk/hangup.php3" } {
            if { ([ACCESS::session exists -sid $apm_cookie]) } {
                ACCESS::session remove
            }
            set uri "/mystartinguri"
            HTTP::respond 302 noserver "Location" "$uri" "Cache-Control" "no-cache, must-revalidate" Set-Cookie "MRHSession=deleted;expires=Thu, 01-Jan-1970 00:00:10 GMT;path=/" Set-Cookie "LastMRH_Session=deleted;expires=Thu, 01-Jan-1970 00:00:10 GMT;path=/"
        }
    }
    

    You can replace "/vdesk/hangup.php3" by your own logout URI.

    You also have to set the correct landing URI. By default, you should set "/" but maybe you have defined a custom one.

    • Damon_Delvechio's avatar
      Damon_Delvechio
      Historic F5 Account
      Yann! Thanks a ton, I will have to test this out but that looks like what I was looking for! Appreciate it!
  • Hi,

    The APM logout URI is /vdesk/hangup.php3

    You can write an irule to change the behavior when you reach this URI. For example :

    when CLIENT_ACCEPTED {
        ACCESS::restrict_irule_events disable
    }
    
    when HTTP_REQUEST {
        if { [HTTP::uri] eq "/vdesk/hangup.php3" } {
            if { ([ACCESS::session exists -sid $apm_cookie]) } {
                ACCESS::session remove
            }
            set uri "/mystartinguri"
            HTTP::respond 302 noserver "Location" "$uri" "Cache-Control" "no-cache, must-revalidate" Set-Cookie "MRHSession=deleted;expires=Thu, 01-Jan-1970 00:00:10 GMT;path=/" Set-Cookie "LastMRH_Session=deleted;expires=Thu, 01-Jan-1970 00:00:10 GMT;path=/"
        }
    }
    

    You can replace "/vdesk/hangup.php3" by your own logout URI.

    You also have to set the correct landing URI. By default, you should set "/" but maybe you have defined a custom one.

    • Damon_Delvechio's avatar
      Damon_Delvechio
      Historic F5 Account
      Yann! Thanks a ton, I will have to test this out but that looks like what I was looking for! Appreciate it!