Forum Discussion

js55161_47239's avatar
js55161_47239
Icon for Nimbostratus rankNimbostratus
Jul 10, 2013

irule to strip out a uri

Hi, does anyone know how to strip out a word from a uri via irule? The original url a client enters in a web browser is https://blah.blah.com/a/b/c.asmx but i need to strip out the a bit as the web page within iis is called b. I already have a irule that is looking for /b and sends it over to another vip but i need to strip out 'a' first. Any ideas?

 

1 Reply

  • Something like this perhaps:

    
    ...
    if { [string tolower [HTTP::uri]] starts_with "/a" } {
         scan $URL {/%*[^/]%s} newuri
         log local0. $newuri
    }
    ...