Forum Discussion
Samir_Jha_52506
Noctilucent
Oct 15, 2015URL Redirection request.
Hi All,
I wanted to write irule with help of "Class-object" but need your help to grep ID value (SAV603,SAV644, SAV651,etc) in URI. SO that based on object i can forward request to respective direc...
Stanislas_Piro2
Cumulonimbus
Nov 05, 2015you can extract value of No parameter:
when HTTP_REQUEST {
set ParamsiteName [URI::query [HTTP::uri] siteName]
if {([string tolower [HTTP::path]] equals "/bin/enterprise") && ($ParamsiteName equals "a")} {
set ParamNo [URI::query [HTTP::uri] No]
switch $ParamNo {
"SAV603" -
"DP6012" -
"SA1005" { HTTP::redirect "http://go.pqr.com/elib" }
default {}
}
}
}
or with class as requested:
when HTTP_REQUEST {
set ParamsiteName [URI::query [HTTP::uri] siteName]
if {([string tolower [HTTP::path]] equals "/bin/enterprise") && ($ParamsiteName equals "a")} {
set ParamNo [URI::query [HTTP::uri] No]
if { ([class match $ParamNo contains class_NoQueryStringValuesToRedirect]) } {
HTTP::redirect "http://go.pqr.com/elib"
}
}
}
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