I have a VIP that I would like to redirect to a URL that looks like this…
I want the user to type in the Vip IP or A record and resolved to one of the nodes in the pool similar to whats is below..
[host] /login.asp
new to iRules, so please help with this.
can you clarify what you are trying to do a little more. Your question is a little vague.
Absolutely sorry… here is what I am trying to do.
I have a pool with each node having a login page example: and
I also have a Virtual Server with ip example: 10.1.1.1 and I want to type in the VIP ip as followed http://10.1.1.1 and redirect it to a client node on the pool.. http://[node]/login.asp
please let me know if this help
Sounds more like you want to re-write the hostname than a redirect. This iRule could do something simple like rewriting the request’s host header to the IP address of the chosen pool member.
when HTTP_REQUEST {
HTTP::host [LB::server addr]
}
Thanks Brad, so if I type in my browser will it redirect it to a node in the pool?
it will not “redirect” the request. A redirect sends a 301 or 302 to the client. That means they wouldn’t be hitting your VIP and more. It will load balance to the select pool member and rewrite the host header to the http request to IP of the pool member. The users browser will not see the rewrite.