Forum Discussion
JamesSevedge_23
Historic F5 Account
Based on your question it seems like you are trying to receive requests from users at site.com/login and if it gets load balanced to server 1 changed the uri to be site.com/one, and site.com/two for server 2 etc.. Is that correct? How come each server can't have /login as the URI? Or at least one uri the same for all servers such as "/internallogin"? If that is the case the below iRule should work for simple redirection.
when HTTP_REQUEST {
if {[HTTP::uri] contains "/login"} {
HTTP::uri /internallogin
pool /Common/poolname
}
}
JamesSevedge_23
Feb 23, 2016Historic F5 Account
Although you could try something like the iRule below to accomplish the URI rewrite. For HTTP_RESPONSE you may need to rewrite it back to /login though using "when HTTP_RESPONSE".
when HTTP_REQUEST_SEND {
clientside {
switch [LB::server addr] {
"1.1.1.1" {
HTTP::uri /one
}
"1.1.1.2" {
HTTP::uri /two
}
"1.1.1.3" {
HTTP::uri /three
}
}
}
}