Forum Discussion
stolivar_88319
Mar 28, 2012Nimbostratus
Using iRule for host header and uri routing (problem)
I have a virtual Server(F5) set up on an IP. I have two websites that share this IP and IIS is configured to handled host header hosting. I also run some java tomcat apps on one of the domains hoste...
stolivar_88319
Mar 29, 2012Nimbostratus
Thanks Aaron, I put that into play and make the changes to actually reflect our real domain names and pools and I get the following error: Thoughts?
01070151:3: Rule [idu-virtual-websites-pool] error:
line 8: [parse error: missing close-brace] [{
switch [string tolower [HTTP::host]] {
salina.kumc.edu {
pool idu-virtual-websites
if {$switch_debug}{log local0. "[IP::client_addr]:[TCP::client_port]: Using idu-virtual-websites pool for [HTTP::host][HTTP::uri]"
return
}
www.kumc.edu {
switch -glob [string tolower [HTTP::uri]] {
"/itunesu*" -
"/pubservices-war*" -
"/ref_form*" -
"/ccv*" {
pool www.kumc.edu-Tomcat
if {$switch_debug}{log local0. "[IP::client_addr]:[TCP::client_port]: Using www.kumc.edu-Tomcat pool for [HTTP::host][HTTP::uri]"}
return
}
}
}
}
If we are still in the iRule select the VS default pool
pool $default_pool
if {$switch_debug}{log local0. "[IP::client_addr]:[TCP::client_port]: Using $default_pool pool for [HTTP::host][HTTP::uri]"}
}
when LB_SELECTED {
if {$switch_debug}{log local0. "[IP::client_addr]:[TCP::client_port]: Selected [LB::server]"}
}
when SERVER_CONNECTED {
if {$switch_debug}{log local0. "[IP::client_addr]:[TCP::client_port]: Connected [IP::server_addr]:[TCP::client_port]"}
}]
line 9: [command is not valid in the current scope] [switch [string tolower [HTTP::host]] {
salina.kumc.edu {
pool idu-virtual-websites
if {$switch_debug}{log local0. "[IP::client_addr]:[TCP::client_port]: Using idu-virtual-websites pool for [HTTP::host][HTTP::uri]"
return
}
www.kumc.edu {
switch -glob [string tolower [HTTP::uri]] {
"/itunesu*" -
"/pubservices-war*" -
"/ref_form*" -
"/ccv*" {
pool www.kumc.edu-Tomcat
if {$switch_debug}{log local0. "[IP::client_addr]:[TCP::client_port]: Using www.kumc.edu-Tomcat pool for [HTTP::host][HTTP::uri]"}
return
}
}
}
}
If we are still in the iRule select the VS default pool
pool $default_pool
if {$switch_debug}{log local0. "[IP::client_addr]:[TCP::client_port]: Using $default_pool pool for [HTTP::host][HTTP::uri]"}
}]
line 9: [command is not valid in the current scope] [string tolower [HTTP::host]]
line 9: [command is not valid in the current scope] [HTTP::host]
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