Forum Discussion
Himanshu_Yadav_
Nimbostratus
Sep 14, 2016Facing sporadic issue with the redirection
Hi, we are facing sporadic issue with the redirection on "HTTP". Some times redirection works but sometimes it gives page not displayed.
Rule xyz-irule
when HTTP_REQUEST {
switch -glob [st...
Vijay_E
Cirrus
Sep 14, 2016It 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"}
}
}
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
DevCentral Quicklinks
* 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
Discover DevCentral Connects