F5 is upgrading its customer support chat feature on My.F5.com. Chat support will be unavailable from 6am-10am PST on 1/20/26. Refer to K000159584 for details.

Forum Discussion

Rusty_Tripp_798's avatar
Rusty_Tripp_798
Icon for Nimbostratus rankNimbostratus
Jan 02, 2014

iRule to determine if a URI is prent and somethign follows it

I'm new to iRules to please bear with me. I need to right an iRule that checks for the existence of a word ( lets say GUI ) within a URI but also has something following the word ( in the case , GUI ). An example will clarify things ( I hope ). And the word ( GUI ) can occur anywhere within URL:

 

Allowed /A/B/GUI/C

 

Disallowed /A/B/GUI

 

Any and all help will be greatly appreciated.

 

Rusty

 

1 Reply

  • Perhaps something like this:

    when HTTP_REQUEST {    
        if { [string tolower [HTTP::uri]] ends_with "gui" } {        
            reject            
        }        
    }    
    

    In the above the key word can exist anywhere in the URI (or not at all) unless the URI ends with the key word.