Rosieodonell_16
Oct 21, 2015Cirrus
Change which SSO you use based on if your device is mobile or not.
Hey Everyone,
I have Virtual server with an access policy where i need to switch the SSO based on what kind of device you are using. Both SSO is "Forms - Client initiated". I created product_mobile_sso and product_tablet_sso sso configurations.
Here is the irule i currently have on it to sort the traffic based on user-agent header info:
when HTTP_REQUEST {
if { (([string tolower [HTTP::header "User-Agent"]] contains "iphone") && ([string tolower [HTTP::uri]] equals "/"))} {
log local0. "Redirecting by iphone detection"
HTTP::respond 302 location "https://www.company.com/mobilepage.aspx"
} elseif { [string tolower [HTTP::uri]] equals "/" } {
log local0. "Redirecting without iphone detection"
HTTP::respond 302 location "https://www.company.com/tabletpage.aspx"
}
}
I tried adding WEBSSO the following code:
when HTTP_REQUEST {
if { (([string tolower [HTTP::header "User-Agent"]] contains "iphone") && ([string tolower [HTTP::uri]] equals "/"))} {
log local0. "Redirecting by iphone detection"
HTTP::respond 302 location "https://www.company.com/mobilepage.aspx"
} elseif { [string tolower [HTTP::uri]] equals "/" } {
WEBSSO:select product_tablet_sso
log local0. "Redirecting without iphone detection"
HTTP::respond 302 location "https://www.company.com/tabletpage.aspx"
}
}
but i get the following error. "Unable to find ss_config (product_tablet_sso) referenced at line 9: [WEBSSO::select product_tablet_sso]". Just wondering if someone has some advice to give. Thanks in advance!