Forum Discussion
hooleylist
Feb 08, 2010Cirrostratus
Hi Joe,
That looks good. With TCL, you need to escape hyphens in variable names with curly braces: ${requested-uri}. It's easier to use an underscore instead.
Here is an updated version you can try:
when HTTP_REQUEST {
switch -glob [string tolower [HTTP::uri]] {
/uri1* -
/uri2* {
set check_response 0
snatpool SNAT_DMZ
pool pool_www.mysite.org_URI1
}
/testlink* {
snatpool SNAT_APZ
set check_response 1
pool pool_www.mysite.org_TESTLINK
}
}
}
when HTTP_RESPONSE {
if {$check_response} {
STREAM::expression "@http://www.mysite.org@https://www.mysite.org@"
STREAM::enable
} else {
STREAM::disable
}
}
Aaron