Forum Discussion
Joe_Pipitone
May 12, 2014Nimbostratus
Portion of iRule not being processed
I have combined multiple iRules into one, however the 2nd portion of the rule is not working. I have confirmed using logging that the URI is being caught, however redirection is not taking place. I...
Cory_50405
May 12, 2014Noctilucent
So the query string is more than just tid=..
Try changing your switch to this:
switch -glob [string tolower [HTTP::host]] {
"oldforum.olddomain.com" {
Check the URI, set to lowercase
switch [string tolower [HTTP::query]] {
"tid=*" {
HTTP::redirect "https://newforum.newdomain.com/default.aspx?g=posts&t=[URI::query [HTTP::uri] tid]"
return
}
"fid=*" {
HTTP::redirect "https://newforum.newdomain.com/default.aspx?g=topics&f=[URI::query [HTTP::uri] fid]"
return
}
"c=*" {
HTTP::redirect "https://newforum.newdomain.com/default.aspx?g=forum&c=[URI::query [HTTP::uri] c]"
return
}
}
}
- Joe_PipitoneMay 12, 2014NimbostratusStill not working. Nothing logged either. It's been driving me crazy. I have several other rules with nested switch statements, haven't had a problem until now. I have isolated this portion of the rule by itself, still not logging or processing.
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