Forum Discussion
eugeneK_pdx
Nimbostratus
Oct 23, 2013Check and replace query string parameter called site for google GSA
I need some help writing an iRule for checking valid values for the parameter site and replace the value with empty-collection if the value does not match www-public-1, www-sec-1, www-sec-2.
whe...
eugeneK_pdx
Nimbostratus
Oct 23, 2013I got this to work with following:
when HTTP_REQUEST {
set site_param_value [string tolower [URI::query "?[HTTP::query]" site]]
switch -glob $site_param_value {
"www-public-1" { HTTP::uri }
"www-sec-1" { HTTP::uri }
"www-sec-2" { HTTP::uri }
default { HTTP::uri [string map {"site=$site_param_value" "site=empty-collection"} [HTTP::uri]] }
}
}
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