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

Forum Discussion

M0_185239's avatar
M0_185239
Icon for Nimbostratus rankNimbostratus
Mar 02, 2016

irule to redirect url

2 Replies

  • At first glance this should redirect correctly! [HTTP::uri] contains both [HTTP::path] and [HTTP::query] (the latter one which you seem to be missing in the redirect example). What is before the "elseif" and does the mobile server issue any redirects of it's own? Test with 'curl -IvkL '.
  • If your www.domain.com and m.domain.com hit the same Virtual Server you will always trigger this iRule as the 'uri' after the redirect will still start with '/test' and create a redirect loop on the client. Try the following simplified iRule:

    when HTTP_REQUEST {
     if{([string tolower {HTTP::host] eq "www.domain.com") && ([string tolower [HTTP::uri]] starts_with "/test")}{
           HTTP::redirect "http://m.domain.com[HTTP::uri]"
     } 
    }
    

    Also is looks to only be part of the iRule, can you post the full iRule so get a better view of what is happening?