craig_lee10_177
Oct 02, 2012Nimbostratus
Need a pointer
Hi I need some help with an irule that I am banging my head with. Basically I need to keep the uri intact from a client point of view and strip out the /development before it gets sent to the backend web server. Please see below which we have working
when HTTP_REQUEST {
switch -glob [HTTP::uri] {
/development/ibi* {
Remove the /development prefix from the uri
HTTP::uri [string map {/development ""} [HTTP::uri]]
use node 1.1.1.1 80
log local0. "Host = [HTTP::host] URI = [HTTP::uri] "
}
/development/app* {
Remove the /development prefix from the uri
HTTP::uri [string map {/development ""} [HTTP::uri]]
use node 2.2.2.2 80
log local0. "Host = [HTTP::host] URI = [HTTP::uri])"
}
/development/* {
Remove the /development prefix from the uri
HTTP::uri [string map {/development ""} [HTTP::uri]]
use node 3.3.3.3 80
log local0. "Host = [HTTP::host] URI = [HTTP::uri])"
}
default {
Take some default action?
node 172.16.204.63 80
}
}
}
The problem I have is that one of the nodes sends a 302 back in the response and the URI contains something like /online/TestLogin.aspx. How do I get it to insert the /development before it goes back to the client i.e. /development/online/TestLogin.aspx so it remains totally transparent to the user?
Many Thank Craig