Forum Discussion
MeAndMyBIGIP_60
Nimbostratus
Jun 21, 2010HTTP::URI redirect to another Pool
Trying to use the sample code here (http://devcentral.f5.com/wiki/default.aspx/iRules/HTTP__uri.html) to do something that should be very simple: when HTTP_REQUEST {
if { [HTTP::uri] ends...
r_dynamo_79563
Nimbostratus
Oct 30, 2012I need to create an iRule for an F5 build where the pool members are listening on a custom port (9200) for a VIP configured on port 80 that will load balance a web interface. Basically the intention is to redirect the HTTP request to one of the pool members on the custom port, and append a string of characters such as "/psp/maps/local" with the redirect to access a particular resource on the web interface.
Below is a sample work in progress, which is syntactically incorrect to demonstrate what I intend to achieve.
when HTTP_REQUEST {
if { [HTTP::path] equals "/" } {
pool pool_9200
HTTP::redirect [HTTP::host][HTTP::uri] "/psp/maps/local"
}
}
For obvious reasons "[HTTP::host][HTTP::uri]" cannot work, because the pool members are not listening on Port 80.
Any feedback will be highly appreciated.
Thanks!
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