Forum Discussion
eliton_199802
Nimbostratus
Aug 24, 2018iRule to redirect to URLs
Hi All,
I am in need of an iRule that redirects users to URLs based on their source IP. I am attaching it to a standard VS with no pool defined. This is what I have come up with, however it does no...
eliton_199802
Nimbostratus
Aug 27, 2018Thanks all for your help, this is what finally worked. Notice the placement of the CIDR notation. Also since we use route domains, it needed to be defined by the %1.
when HTTP_REQUEST { if { ( [IP::addr [IP::client_addr]/24 equals 10.50.1.0%1] ) } { HTTP::redirect "http://abc1.test.com"; } elseif { ( [IP::addr [IP::client_addr]/24 equals 10.60.1.0%1] ) } { HTTP::redirect "http://abc2.test.com"; } elseif { ( [IP::addr [IP::client_addr]/24 equals 10.70.1.0%1] ) } { HTTP::redirect "http://abc3.test.com"; } }
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