Forum Discussion
Chris_Schaerli_
Nimbostratus
May 12, 2008Redirect or rewrite?
Hi,
I am trying to setup something to direct traffic based on source IP. We are rolling out an application and we want to do it in phased approach.
This is wha...
Chris_Schaerli_
Nimbostratus
May 14, 2008Aaron,
I have put something like this out, but all the traffic is falling though to the "else" condition. If I had to guess It is bombing because I need both the path and source IP to true for it to go to the pool. Is this correct?
when HTTP_REQUEST {
if { [HTTP::path] eq "/FOO/"} {
if { [IP::addr [IP::remote_addr] equals 10.12.126.248/255.255.255.255] } {
pool FOO.COM-80 }
if { [IP::addr [IP::remote_addr] equals 10.12.126.249/255.255.255.255] } {
pool FOO.COM-80 }
if { [IP::addr [IP::remote_addr] equals 10.12.126.250/255.255.255.255] } {
pool FOO.COM-80}
if { [IP::addr [IP::remote_addr] equals 10.24.69.2/255.255.255.255] } {
pool FOO.com-80}
} elseif {[IP::addr [IP::remote_addr] equals 10.0.0.0/255.0.0.0] } {
HTTP::redirect "http://www.NEW.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