Forum Discussion
Hector_Salas_85
Nimbostratus
Mar 13, 2007URL Rewrite and LB at HTTP request
Hello,
I am trying to find a way to perform the following:
When traffic comes to a specific Virtual Server IP, load balance and perform a URL rewrite that is different for each of the servers in the pool. For example, I have a pool of two servers. Server 1 is IP address 10.0.0.1 and the site URL for service is www1.domain.com. Server 2 is IP address 10.0.0.2 and its URL is www2.domain.com. Can you give me some suggestions on how I could accomplish this with an iRule?
- The easiest way is to create two pools, one for your www1.domain.com and one for your www2.domain.com. I'm assuming from your post that you have both domains on the same virtual and with that assumption, you can create an iRule that switches on the domain and then dynamically assigns which pool to use.
when HTTP_REQUEST { switch [string tolower[HTTP::host]] { "www1.domain.com" { pool www1_pool } "www2.domain.com" { pool www2_pool } } }
- Hector_Salas_85
Nimbostratus
Thanks Joe,
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