Forum Discussion
JRahm
Feb 28, 2006Admin
In the third rule, it looks like this will never be matched:
if {[HTTP::cookie exists $ckname]} {
if { $uri contains "agencyctr" } {
HTTP::redirect https://$new_url
}
because you are setting ckname to aac2 directly above it. I'd remove this:
when CLIENT_ACCEPTED {
set ckname aac2
set ckvalue [IP::client_addr]
set ckdomain .alliedinsurance.com
}
from your third rule since the first line appears to overwrites the information you want out of the 2nd rule and the next two lines aren't used. I'd also recommend not setting variables unless you will use them frequently. If I were to rewrite your third rule, I'd do something like this:
when HTTP_REQUEST {
if {[HTTP::cookie exists "aac2"]} {
if { [HTTP::uri] contains "agencyctr" } {
HTTP::redirect https://[HTTP::host]/center/templates/welcome.cfm
} else { use pool Shared }
} else { HTTP::redirect https://aac.alliedinsurance.com[HTTP::uri] }
}
HTH