Forum Discussion
Vijay_E
Sep 14, 2016Cirrus
It looks like you are intending to match based on URI but your iRule is matching on both host header & URI: [string tolower [HTTP::host][HTTP::uri]]. If my understanding is right, you should use [string tolower [HTTP::uri]]
If you any CDN traffic, try using OneConnect with /32 netmask.
Use a combined iRule for simplicity:
when HTTP_REQUEST {
HTTP::header insert X-Forwarded-For [IP::remote_addr]
switch -glob [string tolower [HTTP::uri]] {
"/abc" {HTTP::redirect "https://abc.xyz.com"}
"/def" {HTTP::redirect "https://def.xyz.com"}
"/ghi" {HTTP::redirect "https://ghi.xyz.com"}
"*" {HTTP::redirect "http://www.test.xyz.com"}
}
}