Forum Discussion

Vivek_377556's avatar
Vivek_377556
Icon for Altostratus rankAltostratus
Nov 22, 2018

irule to change url with preserving query parameters and include extra names in the final url

Hello,   I am new to irule. Below are the details of my requirement :   I have this url : http://xyz.com/test_check.do?test_id=XXX   I want to write an irule so that it will redirect/respo...
  • Vivek_377556's avatar
    Nov 23, 2018

    I have tried below irule, added in the irule list and it worked correctly :

     

    when HTTP_REQUEST { if {[string tolower [HTTP::uri]] starts_with "/test_check.do?test_id="} { HTTP::redirect "https://xyz.com/testing[HTTP::uri]" } }

     

    Thanks you all for your responses.