Forum Discussion
Dennis_Watson_2
Nimbostratus
Apr 21, 2008Redirect URL to pool member permanently
Hi folks,
I've read dozens of entries trying to find an example that would allow me to do a permanent redirect to the pool member once it was selected.
This may require more than one iRule to execute.
1. Select the node using standard load balancing and monitors, etc.
2. Issue a redirect to the node.
Yes, it is a routeable IP in my intranet and yes, I want the client to see the new URL in the browser.
Something like:
http://abc.com
becomes
http://def.com (or http://1.1.1.2:80)
Connection is redirected, end of LTM processing.
I originally thought this was available as a simple GUI option, but can't find it.
Thanks all !!!
4 Replies
- hoolio
Cirrostratus
So you want the client to make the initial request to example.com which resolves to the VIP address and get an HTTP redirect to the selected node's IP address? If so, you could configure a standard VIP and pool and then add the following rule:when LB_SELECTED { Send redirect with the selected server's IP address HTTP::redirect http://[LB::server addr] }
- gn_105213
Nimbostratus
I have a following query - hoolio
Cirrostratus
Hi there,when LB_SELECTED { log local0. "[IP::client_addr]:[TCP::client_port]: pool info: [LB::server]" }
- Mohammed_M_Irfa
Nimbostratus
Hi Hoolio,
While configuring iRule, which suggested by you i am getting an error.
when LB_SELECTED { Send redirect with the selected server's IP address HTTP::redirect http://[LB::server addr] }
Its getting an error " command is not valid in current event context (LB_SELECTED)"
can you help for this
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