Forum Discussion
Tabish_Mirza_12
Nimbostratus
Mar 08, 2016looking for a irule to redirect URL based on source ip
Hi Folks,
I am looking for a rule to fullfill the following requirement:
redirect the url http://172.16.10.20:9999/orabpel/default/PTCQuerympl/1.0 to an new
url http://192.168.30.128...
VernonWells
Employee
Mar 09, 2016when HTTP_REQUEST {
if { [IP::client_addr] eq "10.10.10.11" && [HTTP::path] eq "/orabpel/default/PTCQuerympl/1.0" } {
HTTP::redirect "http://192.168.30.128:9999/soa-infra/services/default/PTCQuerympl/client"
}
}
as long as you are not using Route Domains. If you add more IPs in the future, you should use a Data Group and if you eventually need to match netblocks, you should wrap the
IP::client_addr in the IP::addr command.Tabish_Mirza_12
Nimbostratus
Mar 09, 2016many thanks indeed Vernon for your help....Let me apply the irule and check.
Moreover, I need one more clarification. I have a VS with Pool(two members) and above redirection irule. Based on above irule if traffic is coming from source IP address: 10.10.10.11 hitting VS with URL ( http://172.16.10.20:9999/orabpel/default/PTCQuerympl/1.0) redirect request to new VS (http://192.168.30.128:9999/soa-infra/services/default/PTCQuerympl/client). Suppose if old VS pool members are down & VS status shows Red. Will the old VS still redirect the traffic coming from source IP address:10.10.10.11 to new VS URL.
means VS which has redirect irule shows down RED (all pool members are down).
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