Forum Discussion
Hannes_Rapp
Nov 05, 2014Nimbostratus
Try the solution below.
Additionally, my recommendation would be to uncomment the event disable statements, if there are other iRules attached to VS which are invoking redirects/responses. (Multiple invocations of redirect/response statements are not permitted and will result in a TCL error)
when HTTP_REQUEST {
set VISITOR "external"
if { [class match [IP::client_addr] equals "data_ip_internal_networks"] } {
set VISITOR "internal"
}
if {$VISITOR == "external"} {
switch [HTTP::host][HTTP::uri] {
"qa-myaccess.com/Login/GentivaLinkTest" {
HTTP::respond 301 location "
event disable
}
"qa-myaccess.gentiva.ghsnet.com/Login/Relias" {
HTTP::respond 301 location "
event disable
}
default {
HTTP::respond 301 location "">
event disable
}
}
} elseif {$VISITOR == "internal"} {
switch [HTTP::host][HTTP::uri] {
"qa-myaccess.com/Login/GentivaLinkTest" {
HTTP::respond 301 location "
event disable
}
"qa-myaccess.gentiva.ghsnet.com/Login/Relias" {
HTTP::respond 301 location "
event disable
}
default {
HTTP::respond 301 location "">
event disable
}
}
}
}
- Hannes_RappNov 05, 2014NimbostratusNote, this retarded encoding tool appears interpret hyperlinks in its own format regardless of code block that was used. Can't find a way to correct it. For both SWITCH statements, the correct code for "default" section would be as follows: default { HTTP::respond 301 location "http://qa-myaccess.com/empowerID" event disable }