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...
MeAndMyBIGIP_60
Nimbostratus
Jun 21, 2010Thanks Hoolio...
can you confirm that I'm going about this correctly in terms of the configs (prior to the irule, as that seem to really be the simple part...)
Original Config:
Virtual Server - VIP (.5)
Content_Pool_2
Node 1 (.10)
Node 2 (.11)
simple iRule resource to redirect HTTP >> HTTPS
when HTTP_REQUEST {
HTTP::redirect https://[HTTP::host][HTTP::uri]
}
result is a request to HTTP://x.x.x.5 gets switched to HTTPS:// and routed to either Node 1 or Node 2 based on least connections.
New Config (no virtual server assignment or association):
Content_Pool_1
Node 1 (.13)
result is a request to HTTP://x.x.x.5 gets switched to HTTPS:// and routed to either Node 1 or Node 2 based on least connections, and a request to HTTP://x.x.x.5/content1 gets switched to HTTPS:// and routed to Node 3
This is the New iRule:
when HTTP_REQUEST {
if { [HTTP::uri] ends_with "content1" } {
pool content_pool_1}
HTTP::redirect https://[HTTP::host][HTTP::uri]
}
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