jacob900_39797
May 04, 2007Nimbostratus
multiple url/uri rewrite w/multiple default statements???
I have a group here at work that wants to accomplish the following translations. It is the same vip but the URI is different for each app. I have a http redirect in place for the http-to-https part. They want to have a simple url that translates into a specific url/uri combination. That is okay too but they also want a "Default" statement put into effect so that for each app any url/uri combination gets redirected to send the user to the right url/uri path.
Task 1 - convert url into url/uri combination based on what original url is.
http://app1.abc.com > https://internal_url.abc.com/app1
http://app2.abc.com > https://internal_url.abc.com/app2
http://app3.abc.com > https://internal_url.abc.com/app3
Task 2 for each app to have a deafaul statement so that any url/uri-wildcard cobmination takes them to the right path, ie: url/stuff, url/unknown, etc.
http://app1.abc.com/* (anything) > https://internal_url.abc.com/app1
http://app2.abc.com/* (anything) > https://internal_url.abc.com/app2
http://app3.abc.com/* (anything) > https://internal_url.abc.com/app3
With one app, it's workable but I don't understand how to do multiple url to url/uri redirects and multiple "Defaut" statements. I don't see any examples (so far) that are doing this style exactly. Any samples would be highly appreciated.
Sample rule for single app - how to do multiple?????
when HTTP_REQUEST {
switch -glob [string tolower [HTTP::uri]] {
"/app1/*" {
pool app1_80
}
default {
HTTP::redirect http://[HTTP::host]/app1/
}
}
}