Hi VFB,
could it be that you wanna parse the HOST-header for a given site name and then apply some redirects based on the a given URI? If so then this code would do the trick...
when HTTP_REQUEST {
switch -exact -- [string tolower [HTTP::host]] "www.yahoo.com" {
switch -exact -- [string tolower [HTTP::uri]] "/news" - "/weather" {
HTTP::redirect "https://www.yahoo.com/login.aspx=0"
} default {
do nothing
}
} "www.google.com" {
switch -exact -- [string tolower [HTTP::uri]] "/news" - "/weather" {
HTTP::redirect "https://www.google.com/login.aspx=0"
} default {
do nothing
}
} default {
do nothing
}
}
BTW: If not, then elaborate some additional details on the "header" you want to parse.
Cheers, Kai