Forum Discussion

ecwlam's avatar
Icon for Altostratus rankAltostratus
Dec 22, 2022

iRule redirection

May I know how to write the iRule with uri redirection?  --> including the correspoing link under For example:
  • muhamed_elfiky's avatar
    Dec 23, 2022

    Hi ecwlam 


    you can use this  IRule:

    when HTTP_REQUEST {

    if {[HTTP::uri] starts_with "/aa/"} {

    HTTP::uri [string map {"/aa/" "/bb/"}[HTTP::uri]]

    HTTP::redirect "[HTTP::uri]"