Forum Discussion

Samir_Jha_52506's avatar
Samir_Jha_52506
Icon for Noctilucent rankNoctilucent
May 31, 2016

Help require in iRule creation

Hi All,

i need to create an irule on LTM. The following is to be achieved

https://pqr.abc.com/?target=/rewards/download&psn=8YQ6QHGB2HDV&pkproxy=TPWM979HW2QTHVJD69CHW8GFP&service=sbt&action=signin®ister=1

https://xyz.pqr.com/ssoprecursor/home?psn=8YQ6QHGB2HDV&pkproxy=TPWM979HW2QTHVJD69CHW8GFP&returnurl=/onboard/home/setup&service=sbt

Condition psn=

8YQ6QHGB2HDV
--> Dynamic String

pkproxy=

TPWM979HW2QTHVJD69CHW8GFP
--> Dynamic String

Could anybody please help me on this.

2 Replies

    1. You need to better describe the problem.

       

    2. Put forth at least a skeletal iRule that you developed and it is easier to assist.

       

  • Hi,

    HTTP query parameters can be extracted with command:

    set psn [URI::query [HTTP::uri] psn]
    set pkproxy [URI::query [HTTP::uri] pkproxy]
    

    Then, use these variables in redirect.

    when HTTP_REQUEST { 
        set psn [URI::query [HTTP::uri] psn]
        set pkproxy [URI::query [HTTP::uri] pkproxy]
        if {([HTTP::path] equals /) && ([URI::query [HTTP::uri] target] equals "/rewards/download")}{
            HTTP::redirect https://xyz.pqr.com/ssoprecursor/home?psn=$psn&pkproxy=$pkproxy&returnurl=/onboard/home/setup&service=sbt
        }
    }