Forum Discussion
Redirect to specific port/page
Hi, I have a request from our applications group to create a VIP that redirects to a pool, and in that pool the members go to port 7001/apex
I setup the pool with port 7001 for the servers, and an Irule that I thought would do the redirect to the /apex page: when HTTP_REQUEST { HTTP::header replace Host "[HTTP::host]/apex" } however, it seems to just go to port 7001. Any help would be appreciated as I am a novice at iRules.
4 Replies
- What_Lies_Bene1
Cirrostratus
Hi, you need to use the HTTP::uri command, not HTTP::header - no need to modify the host, just the URI.
Do you just want to direct to /apex if no URI has been specified (/) or in all cases? My concern is that a request to /apex/some/path/index.html will be redirected to /apex.
- What_Lies_Bene1
Cirrostratus
I think this is the safest way;
when HTTP_REQUEST { if { [HTTP::uri]] equals "/" } { HTTP::redirect "/apex/" } } - John_Base_11768
Nimbostratus
Thanks - After my application owner stopped by, what he really wants is a proxypass rule, as he doesn't want the end users to ever see www.somesite.com/apex - just www.somesite.com
It also turns out they are not load balancing the application - so even though I could do it on the F5 - they can also do the same thing on the server in Apache - they just wanted to use the F5 so they don't have to update the cert on the server when it expires.
- What_Lies_Bene1
Cirrostratus
OK, if you haven't already, there are many examples to be found here on DC.
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