VFB
Jan 06, 2016Cirrus
http header and uri redirect
Hello, I'm attempting to construct an iRule that looks at a header and URI, then performs a redirect if they match. This is what I've attempted but unsuccessful. I have multiple redirects based on different headers and URI's, but this is a base of what I need to get started. Thanks in advance.
when HTTP_REQUEST { switch -glob [string tolower [HTTP::header]] contains "www.yahoo.com" and [HTTP::uri]] equals "/news" - "/weather" { HTTP::redirect "https://www.yahoo.com/login.aspx=0" } else { when HTTP_REQUEST { switch -glob [string tolower [HTTP::header]] contains "www.google.com" and [HTTP::uri]] equals "/news" - "/weather" { HTTP::redirect "https://www.google.com/login.aspx=0" } } }