Forum Discussion
I am sooooooo close. Read through nitass reply and changed my rule around some. If I test with: when RULE_INIT
{ set static::DEBUG 1 }
when HTTP_REQUEST {
if { [active_members INF-HC-HTTP] < 1 }
{ switch -glob [string tolower [HTTP::path]]
{
"*.gif" -
"*.css" {
HTTP::uri [string range [HTTP::uri] [string last / [HTTP::uri]] end]
}
default {
HTTP::uri /
}
}
pool QA-PH
} }
everything works like a charm on all parts of my web site. Main, resource and access all come up with images and CSS and it's all right. Problem is if I try to add:
when RULE_INIT
{ set static::DEBUG 1 }
when HTTP_REQUEST {
if { [active_members INF-HC-HTTP] < 1 }
{ switch -glob [string tolower [HTTP::path]]
{
"*.gif" -
"*.css" {
HTTP::uri [string range [HTTP::uri] [string last / [HTTP::uri]] end]
}
default {
HTTP::uri /
}
}
pool QA-PH
} } elseif
{ [class match [string tolower [HTTP::uri]] starts_with QA-HC-URI] } {
pool INF-HC-HTTPDNN
}
else { pool INF-HC-HTTP } }
I get 2 errors - Line 4 [wrong of args] and line 23 [command not valid in current scope]. I've dug through the code and I don't see any missing open/close brackets and the logic og the if/elseif's makes sense to me but I've got to be missing something.