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
Oct 15, 2015Hi,
HTTP::path of these URLs is /bin/enterprise and not /bin/enterprise?siteName=a&No=SAV603
/bin/enterprise?siteName=a&No=SAV603 is stored in the variable HTTP::uri
? character with the -glob option will match any character and not only ?
there is also another issue in the irule a lower case URI cannot be compared with a string containing uppercase characters
when HTTP_REQUEST {
switch [HTTP::uri] {
"/bin/enterprise?siteName=a&No=SAV603" -
"/bin/enterprise?siteName=a&No=DP6012" -
"/bin/enterprise?siteName=a&No=SA1005" { HTTP::redirect "http://go.pqr.com/elib" }
default {}
}
}
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