Forum Discussion
Frank_Nsubuga_3
Dec 19, 2018Nimbostratus
iRule using switch -glob to block URI containing /xyz/* but allow /xyz/abc
Hi, I'm trying to achieve what's written in the title but I'm struggling.
What I've got below is where I'm at:
How do I fix it so the traffic for "/ecp/?rfr=owa&owaparam=modurl%3d0&p=organize/aut...
Stanislas_Piro2
Dec 26, 2018Cumulonimbus
with URI `/ecp/?rfr=owa&owaparam=modurl%3d0&p=organize/automaticreplies.slab, [string tolower [HTTP::path]] will return :
/ecp/
So the code must be:
when HTTP_REQUEST {
switch -glob -- [string tolower [HTTP::path]] {
"/owa*" {
pool f5lab-https-pool
log local0. "OWA rule hit"
ASM::enable "test"
return
}
"/ecp/" {
log local0. "ECP extra rule hit"
pool f5lab-https-pool
ASM::enable "test"
return
}
"/ecp/*" {
pool f5lab-https-pool
log local0. "ECP wildcard rule hit"
reject
}
}
}
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects