Forum Discussion
CSA
Nimbostratus
Oct 29, 2012Smartest way to do a class lookup case insensitive
Hi,
Everything is in the title.
I'd like to use class lookup (or a class match -value as it's the same) in a case insenstive way. There isn't any "-nocase" option like in some...
nitass
Employee
Oct 29, 2012i think this could be a bit better.
when HTTP_REQUEST {
set host [string tolower [HTTP::host]]
set uri [string tolower [HTTP::uri]]
if { [class match -- "http://$host$uri" equals redirection_class] } {
HTTP::redirect [class match -value "http://$host$uri" equals redirection_class]
}
}
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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