Forum Discussion
URL Redirect
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.
5 Replies
- Brad_Parker
Cirrus
can you clarify what you are trying to do a little more. Your question is a little vague. - Jose_Loera_1179
Nimbostratus
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
- Brad_Parker
Cirrus
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] } - Jose_Loera_1179
Nimbostratus
Thanks Brad, so if I type in my browser will it redirect it to a node in the pool?
- Brad_Parker
Cirrus
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.
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com