Forum Discussion
Okay, let's break this down, starting with the iRule:
when HTTP_REQUEST {
if { [string tolower [HTTP::host]] ends_with ".directory.kamlesh.com" } {
pool pool_uat_jboss7
HTTP::uri "/rest2ldap"
}
}
What you're saying here, is if the HTTP host header ends with ".directory.kamlesh.com", send that request to the pool_uat_jboss7 pool, and change the URI to /rest2ldap.
So the request to
http://uat2-jboss7.digital-solutions.kamlesh.com:8080/rest2ldap/users/admin_f2400731
will match the HTTP host header requirement, send to the pool, and change the URI from /rest2ldap/users/admin_f2400731 to simply /rest2ldap.
The request to
http://uat1-jboss7.digital-solutions.kamlesh.com:8080/rest2ldap/users/admin_f2400731
will also match the HTTP host header requirement, send to the pool, and change the URI from /rest2ldap/users/f2400731 to simply /rest2ldap.
It's important to realize here that you've not provided any logic to tell the difference between uat1 and uat2. Are these running on separate uat1 and uat2 VIPs, or just one VIP for both? Further, you're replacing the incoming URI with a static /rest2ldap. Is that what you really want it to do? In any case, it would seem that a request to /rest2ldap on one of the backend servers is producing a 404 error.