# irule plus switch plus globbing

**URL:** <https://community.f5.com/t/irule-plus-switch-plus-globbing/48980>\
**Category:** Technical Forums\
**Tags:** irules, security\
**Created:** [March 20, 2021, 10:33am UTC](https://community.f5.com/t/irule-plus-switch-plus-globbing/48980 "2021-03-20T10:33:43Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![AlexS\_yb](https://avatars.discourse-cdn.com/v4/letter/a/13edae/32.png) [@AlexS\_yb](https://community.f5.com/u/AlexS_yb)\
**Post date:** [March 20, 2021, 10:33am UTC](https://community.f5.com/t/irule-plus-switch-plus-globbing/48980/1 "2021-03-20T10:33:43Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Enes\_Afsin\_Al](https://d1p9zq3aats0t8.cloudfront.net/user_avatar/community.f5.com/enes_afsin_al/32/15359_2.png) [@Enes\_Afsin\_Al](https://community.f5.com/u/Enes_Afsin_Al)\
**Post date:** [March 24, 2021, 8:57pm UTC](https://community.f5.com/t/irule-plus-switch-plus-globbing/48980/2 "2021-03-24T20:57:42Z")

</div>

Hi AlexS\_yb,

Hope this helps.

```tcl
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.

---

<div class="post-metadata">

**Author:** ![AlexS\_yb](https://avatars.discourse-cdn.com/v4/letter/a/13edae/32.png) [@AlexS\_yb](https://community.f5.com/u/AlexS_yb)\
**Post date:** [March 24, 2021, 9:40pm UTC](https://community.f5.com/t/irule-plus-switch-plus-globbing/48980/3 "2021-03-24T21:40:15Z")

</div>

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
