DM_5174
Nov 02, 2011Nimbostratus
Redirect to another POOL with URI and port
Hi All,
I was wondering if there is a way to redirect a URI to POOL and keeping
the URI? Below are the irule to send to the pool, however, I could not figure out
or know if there is a way to keep the uri also when sending to this pool...Example of what is needed:
1. external users goes to http://www.mydomain.com/soap/newapp1
2. based on matching the URI "/soap/newapp1", they are forwarded to a member in the SOAP_POOL that is listening on port 8080, however during this, the URI needs to match "http://192.168.2.100:8080/soap/newapp1".NOTE: We do not want to redirect from one link to another since this server is internal and not accessible to internet clients. So, if I was an external users and i enter
"http://www.mydomain.com/soap/newapp1", I SHOULD not get redirected to
"http://192.168.2.100/soap/newapp1" because they will not be able to access the
internal IP of the web server.POOL: SOAP_POOL
Member: 192.168.2.100:8080
when HTTP_REQUEST {
if {[HTTP::uri] equals {"/soap/newapp1/"}}
{
pool SOAP_POOL
}
switch -glob [string tolower [HTTP::uri]] {
"/app1*" -
"/app2*" -
"/app3*" -
"/app4*" -
{
pool APACHE_SERVER_POOL }
default {
pool IIS_WEB_POOL
}
}
}
-DM