Forum Discussion
MeAndMyBIGIP_60
Nimbostratus
Sep 02, 2009Nesting a redirect to another pool?
So I have an existing HTTP > HTTPS redirect rule running fine that's running on Pool1:
when HTTP_REQUEST {
HTTP::redirect https://[HTTP::host][HTTP::uri]
}
I have another, Po...
The_Bhattman
Nimbostratus
Sep 02, 2009Try this
Where the default pool VIP:80 is pool 2 and default pool for VIP:443 is pool 1
This code would be applied on VIP:80
when HTTP_REQUEST {
if { ([HTTP::host] eq "www.foo.com") } {
switch -glob [HTTP::uri] {
"/" { HTTP::redirect "https://[HTTP::host]" }
"/bar" { HTTP:redirect "http://www.bar.com" }
}
}
}
This assumes that www.bar.com is hosted on the VIP:80
Hope this helps
CB
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