Forum Discussion
ShakN_167332
Nimbostratus
Aug 20, 2014Need help in Irule redirection for multiple sites.
in our setup we have sites which are accessed by internal users as well as internet users via http and https. so we have created 4 VS (2 internal VS, one for http and one for https for internal users...
nitass_89166
Noctilucent
Aug 24, 2014just a few comments.
-
HTTP::host returns fqdn part only (e.g. asites.abc.com). uri is returned by HTTP::uri (e.g. /bseu/finance).
-
glob option can be removed if not used.
- i understand this irule will be assigned to internet https virtual server (you mentioned you separate http and https virtual server). so, no need to check whether it is http or https.
when HTTP_REQUEST {
if {[class match [IP::client_addr] equals InternalHosts]} {
HTTP::redirect http://[HTTP::host][HTTP::uri]
} else {
switch -- [string tolower [HTTP::host][HTTP::uri]] {
"asites.abc.com/bseu/finance" {
HTTP::redirect "http://asites.internet.abc.com/sites/finance"
}
}
}
}
- ShakN_167332Aug 25, 2014
Nimbostratus
01070151:3: Rule [test] error: line 3: [parse error: PARSE syntax 104 {syntax error in expression " class match [HTTP::uri] equals test ": variable references require preceding $}] [{ class match [HTTP::uri] equals test }]
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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