Forum Discussion

MDPF52_180608's avatar
MDPF52_180608
Icon for Nimbostratus rankNimbostratus
Dec 09, 2015

APM URI handling with an existing session

Hi Devcentral,

 

I am trying to implement an access policy that basically select the branch based on the landing URI:

 

  • User go to the logon page
  • User clicks on the reset password link (As a workaround I have configured another VS to listen on a different port in order to handle it with another APM policy that provides the password reset procedure)
  • I would like to use one Access policy on a single VS but the main issue is that i try to use the landing URI box on the top of the APM policy but the user already have an existing APM session.

Do you think that this is possible to achieve? Basically I need to create a separate APM session(with the same policy) when the resource "/changepass" is requested by the client, its access session needs to be deleted in order to re-route the APM evaluation on the other path with the password reset macro.

 

Thanks in advance,

 

Best Regards,

 

M.

 

2 Replies

  • Hi,

    you can use this irule:

    when HTTP_REQUEST {
        switch [HTTP::path] {
            "change_landing" {
                ACCESS::session remove
                set newuri [URI::query [HTTP::uri] new_uri]
                if {$newuri ne "" } {HTTP::redirect localtion $newuri} else {HTTP::redirect localtion "/"}
                return
            }
            default {
                 Default actions
            }
        }
    }
    

    and use the following link to change landing uri:

    /change_landing?new_uri=/changepass

  • Sorry,

    the HTTP::redirect format was wrong:

    when HTTP_REQUEST {
        switch [HTTP::path] {
            "change_landing" {
                ACCESS::session remove
                set newuri [URI::query [HTTP::uri] new_uri]
                if {$newuri ne "" } {HTTP::redirect $newuri} else {HTTP::redirect "/"}
                return
            }
            default {
                 Default actions
            }
        }
    

    }