Forum Discussion
ST_Wong
Cirrus
Apr 02, 2014URL path rewrite?
Hi all,
Is it possible to perform following redirection using iRules?
http://www.example.com -> node1 and node2
http://www.example.com/external -> node3 and node4 (and user sees http://ww...
Cory_50405
Noctilucent
Apr 02, 2014Try this, assuming pool node34 is defined with your nodes 3 and 4 as members, and pool node12 is defined with your nodes 1 and 2 as members:
when HTTP_REQUEST {
if { [string tolower [HTTP::host]] equals "www.example.com" } {
if { [string tolower [HTTP::uri]] equals "/external" } {
pool node34
}
else {
pool node12
}
}
Also keep in mind this isn't redirection, only pool selection based on the client's request. No redirection should be needed here.
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