Forum Discussion

KT_271103's avatar
KT_271103
Icon for Nimbostratus rankNimbostratus
Sep 15, 2016

irule question

Can anyone tell the meaning of below F5 irule command

 

HTTP::uri [string range $uri 4 end]

 

2 Replies

  • Hi Kiosk,

    a syntax of...

    HTTP::uri [string range $uri 4 end]

    ... means that you will set the currently requested URI to a new value with a string range from the

    5
    character to the
    end
    of the variable
    $uri
    . (Note: the
    4
    is the number of character to left out from the beginning)

    Example: If the variable

    $uri
    is
    /abc/xyz/file.ext
    then
    HTTP::uri
    will become
    /xyz/file.ext
    after this command. The leading
    /abc
    (aka.
    4
    chars) of
    $uri
    will be stripped...

    Cheers, Kai