Forum Discussion

2 Replies

  • oguzy's avatar
    oguzy
    Icon for Cirrostratus rankCirrostratus

    Hi Rahul,

    "abc.com" is the host part of the url, and "/v2" is the uri. So, you can try that one:

    when HTTP_REQUEST { 
       if { [string tolower [HTTP::uri]] ends_with "/v2/" } {
          HTTP::redirect "https://abc.com/xyz/v2/"; 
       } 
    }
    
  • You do not need a semicolon at the end of the redirect

    when HTTP_REQUEST { 
        if { [string tolower [HTTP::uri]] ends_with "abc.com/v2/" } { 
            HTTP::redirect "https://abc.com/xyz/v2/" 
        } 
    }