Forum Discussion
Cory_50405
May 12, 2014Noctilucent
Sorry, this one should finally work. Your nested switch needs the -glob:
when HTTP_REQUEST {
switch -glob [string tolower [HTTP::host]] {
"oldforum.olddomain.com" {
Check the URI, set to lowercase
switch -glob [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, 2014NimbostratusGetting results now! Something strange is going on after the redirect takes place, but I will continue to troubleshoot. Thanks for your time - much appreciated.
- Cory_50405May 12, 2014NoctilucentYou got it. Glad things are working for you now.