Forum Discussion
hooleylist
Feb 14, 2011Cirrostratus
switch accepts the hyphen syntax to use the same action for multiple string patterns. 'if' does not. You could use another switch nested in the first switch to do this:
when HTTP_REQUEST {
switch -glob [string tolower [HTTP::uri]] {
"/events/a-company-event-2010*" {
HTTP::redirect "http://oneofourdomains.com/Events/event-2011"
}
default {
switch [string tolower [HTTP::host]] {
"www. oneofourdomains.com" -
"www. adifferentone.com" -
"adifferentone.com" {
HTTP::redirect "http://oneofourdomains.com[HTTP::uri]"
}
}
}
}
}
Aaron