Persist Cookie and Domain Modification iRule question
Hi,
I am newbie to F5 and I am trying to find the following iRule is valid. or How can I achieve something similar to below.
In Plain text
Browser sends a request to www.foo.com.au/Login/someapp
F5 should intercept and redirect to https://accesscontrol.abc.com.au/Login/someapp
accesscontrol.abc.com.au is a VIP / F5 address and it should insert a cookie "setRequestAuthnContxt=SOMEKEY" and domain
to be one level down which is abc.com.au and not the accesscontrol.abc.com.au . Also I would like to see
when HTTP_REQUEST {
if { [HTTP::host] equals "www.foo.com.au" and [HTTP::uri] starts_with "/Login/someapp" } {
HTTP::redirect "https://accesscontrol.abc.com.au/Login/someapp [HTTP::host][HTTP::uri]"
}
}
when HTTP_REQUEST {
if { [HTTP::host] equals "accesscontrol.abc.com.au" and [HTTP::uri] starts_with "/Login/someapp" }
{ when HTTP_RESPONSE {
HTTP::cookie insert name "setRequestAuthContxt" SOMEKEY [HTTP::cookie value "old-cookie-name"]
HTTP::cookie domain $aCookie .abc.com.au
}
HTTP::redirect "https://www.foo.com.au/someapp [HTTP::host][HTTP::uri]"
}
}
Appreciate your response.