Forum Discussion
Rick_Deerberg_2
Nimbostratus
Jun 14, 2006How to write an iRule to redirect to multiple uri's and to specific TCP Port (81)
I am a newbie when it comes to load balancing and iRules.
I have a user who wants to the following configured.
Default or main page/site
https://default.domain.com/
Site A
https://differentserver.domain.com/siteA
Site B
https://default.domain.com/siteB/logon.html
Pools
Default Pool1.1.1.11.1.1.2 (Port 80)
SiteA Pool2.2.2.22.2.2.3 (Port 80)
SiteB Pool1.1.1.11.1.1.2 (TCP Port 81)
When the uri equals https://default.domain.com
After authenticating, send them to the Default Pool
When the uri equals https://default.domain.com/siteA
After authenticating, send them to pool SiteA Pool, and add /siteA to the end of the uri
When the uri equals https://default.domain.com/siteB
Direct them to pool SiteB Pool, and add /logon/logon.html to the end of the uri and make sure they are directed to TCP port 81
Additional Notes:
*We are terminating client ssl on the load balancer.
*We are not encrypting traffic between the load balancer and the servers.
*In the above case there are two physical servers.
*One server provides HTTP and port 81 (logon) services for the Default and SiteB Pool
*The other server provides services (HTTP) for the https://default.domain.com/siteA requests
I contacted technical support and they suggested using multiple virtual servers. Any assistance/examples/suggestions would be greatly appreciated.
Thanks
- Deb_Allen_18Historic F5 AccountI'm not sure I fully understand what you're trying to do, so let's try to refine the problem description:
- Rick_Deerberg_2
Nimbostratus
Thanks for the reply. - Deb_Allen_18Historic F5 AccountYou'll need to direct requests to the server pools regardless of authentication status, then, either with a rule or by defining separate virtuals as suggested.
- Rick_Deerberg_2
Nimbostratus
Hopefully, this may help explain what I'm trying to do. - Deb_Allen_18Historic F5 AccountOK, how about this then:
The pool for site A would contain the appropriate list of port 80 servers, and requests for any URI /already/ containing the string "site-A" would now include that string twice:when HTTP_REQUEST { set myURI [string tolower [HTTP::uri]] if { $myURI contains "site-a" } { HTTP::uri /site-A[HTTP::uri] pool site-A } elseif { $myURI contains "site-b" } { HTTP::uri /logon/logon.html pool site-B } else { pool Default_Pool } }
- Deb_Allen_18Historic F5 Account(edited last post to remove extraneous "/")
- Rick_Deerberg_2
Nimbostratus
Thanks!! With just a small modification I think I've got it working. When I get everything cleaned up I'll let you know how it's going. - Deb_Allen_18Historic F5 Accountno problem, glad I could help.
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