Hi,
Your problem in on your switch condition.
If your client comes with a URI /customer1/test, his request will match your default condition.
You should use -glob option and a wildcard at the end of your URIs :
when HTTP_REQUEST {
set reload_page {
No valid page. Please choose the correct one.
}
switch -glob [string tolower [HTTP::uri]] {
"/customer1*" {
event disable
HTTP::redirect "https://portal.website.foo/Citrix/Remote-Customer1/auth/login.aspx"
}
"/customer2*" {
event disable
HTTP::redirect "https://portal.website.foo/Citrix/Remote-Customer2/auth/login.aspx"
}
"/customer3*" {
event disable
HTTP::redirect "https://portal.website.foo/Citrix/Remote-Customer3/auth/login.aspx"
}
"/" {
log local0. "iRule : No URI choosen."
HTTP::respond 200 content $reload_page
}
Default {
log local0. "iRule : None of the above ;-)"
}
}
}