Technical Forum
Ask questions. Discover Answers.
cancel
Showing results for 
Search instead for 
Did you mean: 

irule plus switch plus globbing

AlexS_yb
Cirrocumulus
Cirrocumulus

Hi

 

  switch -glob [string tolower [HTTP::path]] {

   "/testsso/logout" -

   "/testsso/logout/*" {

}

}

 

I want this to match

/testsso/logout

and

////testsso/logout

 

can i use

 

[/]testsso/logout

 

 

2 REPLIES 2

Hi AlexS_yb,

Hope this helps.

when HTTP_REQUEST {
    if { [string map {"/" ""} [HTTP::uri]] starts_with "testssologout"} {
        #log local0. "[HTTP::uri]"
    }
}

I could not find how to do it with regex.

Hmm, okay i see how to do it for if then.. I guess I can move that to switch.

 

cause iam rather new to F5. I have found also you can do HTTP::uri -normalized which removes all of the extra stuff

 

thanks