Mar 27, 2026 - For details about updated CVE-2025-53521 (BIG-IP APM vulnerability), refer to K000156741.

Forum Discussion

Rahul_Gupt_2401's avatar
Rahul_Gupt_2401
Icon for Nimbostratus rankNimbostratus
Feb 19, 2018

Problem with URL redirection

I want to do a URL redirection from https://abc.com/v2/ to https://abc.com/xyz/v2/. For this I below irule is not working. Could someone please help in identifying the issue and correct it

 

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

 

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/" 
        } 
    }