Forum Discussion
santhana_121263
Nimbostratus
Mar 12, 2013Persist 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....
nitass
Employee
Mar 13, 20131
[root@ve10:Active] config b rule myrule list
rule myrule {
when HTTP_REQUEST {
if { [HTTP::host] equals "www.foo.com.au" and [HTTP::path] starts_with "/Login/Something" } {
HTTP::redirect "]"
}
}
}
[root@ve10:Active] config curl -Ik https://www.foo.com.au/Login/Something/sweet
HTTP/1.0 302 Found
Location: https://as.abc.com.au/Login/Something/sweet
Server: BigIP
Connection: Keep-Alive
Content-Length: 0
2
[root@ve10:Active] config b rule myrule list
rule myrule {
when HTTP_REQUEST {
if { [HTTP::host] equals "as.abc.com.au" and [HTTP::path] starts_with "/Login/Something" } {
HTTP::respond 302 Location "https://www.foo.com.au/TheApplcation" "Set-Cookie" "setRequestAuthContxt=SOMEKEY; path=/; domain=.abc.com.au"
}
}
}
[root@ve10:Active] config curl -Ik https://as.abc.com.au/Login/Something/sweet
HTTP/1.0 302 Found
Location: https://www.foo.com.au/TheApplcation
Set-Cookie: setRequestAuthContxt=SOMEKEY; path=/; domain=.abc.com.au
Server: BigIP
Connection: Keep-Alive
Content-Length: 0
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