Forum Discussion
http redirect based on path and query strings
For example:
If one of the class entries is:
www1.domain.com/abc/xyz.do?aaa&bbb&ccc www2.domain.com/new/path.do?zzz&yyy&xxx
All of the following must match and redirect to the www2 URL:
www1.domain.com/abc/xyz.do?bbb&ccc&aaa
www1.domain.com/abc/xyz.do?aaa&bbb&ccc&ddd
www1.domain.com/abc/xyz.do?aaa&ddd&ccc&bbb
Does anyone have an elegant solution for this?
- hooleylistCirrostratusHi Jim,
ltm data-group uri_to_pool_dg { records { anothervalue|avalue|value3 { data match1 } anothervalue2|avalue3|value5 { data match2 } } type string }
- Ashish_Ram_Tak1NimbostratusDear Aaron,
- hooleylistCirrostratusHi Ashish,
when HTTP_REQUEST { if { [string tolower [HTTP::header "User-Agent"]] contains "iphone" } { HTTP::redirect "https://lite.example.co.in" } }
- Ashish_Ram_Tak1Nimbostratus
Dear Aaron,
Below is the iRule which i am using currently, should i have to do any changes in it.
when HTTP_REQUEST {
switch -glob [string tolower [HTTP::header User-Agent]] {
"*iphone*" -
"*android*" -
"*ipad*" -
"*windows phone*" -
"*windows ce*" -
"*blackberry*" -
"*symbinos*" -
"*symbain os*" -
"*symbian*" -
"*java*" -
"*winowsphone*" -
"*windowsce*" {
HTTP::redirect "https://lite.example.co.in/[HTTP::uri]"
return
}
}
}
- Ashish_Ram_Tak1Nimbostratus
Dear Aaron,
Waiting for your reply.
Regards,
Ashish
Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com