Forum Discussion
nitass
Employee
just 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_167332
Aug 25, 2014Nimbostratus
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 }]