I have a data group with 166 lines of source and target URLs for redirect. Most source URLs include 1 to 3 different queries. I need to find a way to match an incoming path and each query in any order and possibly with additional queries mixed in.
I’m not sure what the most efficient way to handle the lookups would be though. Maybe you could always order the parameter values in the data group in the same order and then form the string to lookup in the same way.
For example, if you have a query string like:
param2=anothervalue¶m1=avalue¶m3=value3
you would parse the values for param1, param2 and param3, concatenate them and then do a lookup against the data group which has the param values combined in the same way:
set value [class match -value “[URI::query [HTTP::uri] param1]|[URI::query [HTTP::uri] param2]|[URI::query [HTTP::uri] param3]” equals query_string_parameters_dg]
Your data group would have the parameter values concatenated with pipes as well:
ltm data-group uri_to_pool_dg {
records {
anothervalue|avalue|value3 {
data match1
}
anothervalue2|avalue3|value5 {
data match2
}
}
type string
}
We are banking customer and we have decided to create mobile user login for our Internet customers, below is the senireo
1) Initially we have www.example.in in public DNS now when this request comes to our LTM it will redirect to home.example.co.in, now when any mobile user type www.example.in in his mobile browser he will go to home.example.co.in i have assigned an iRule to the VS of home.example.co.in to redirect that traffic to lite.example.co.in and its working fine if the user is mobile user based on his OS other desktop and laptop users will straight away go to home .example.co.in.
2) Now in another case we have given one link in a webpage of lite.example.co.in IF YOU WANT TO GO TO MAIN SITE PLEASE CLICK HERE, when user click on this link (is main==true) query string will be passed and that particular mobile user will have to move to home.example.co.in.
But unfortunately we still haven’t fined any solution for this, could you please help me on the 2nd case.
Below is the iRule which we are using for mobile user redirection.
Make sure to set the string you’re comparing to lowercase (iPhone → iphone). Also remove the * from the string as contains logically checks for *iphone* in the example below.
when HTTP_REQUEST {
if { [string tolower [HTTP::header "User-Agent"]] contains "iphone" } {
HTTP::redirect "https://lite.example.co.in"
}
}
Here are a couple of posts where we discussed options for mobile client redirects (particularly the iRule in the second example):