Forum Discussion
kng_107168
Nimbostratus
Mar 02, 2011unable to redirect to a different page on another pool
This is what I have but the client browser doesn't seems to like the redirection.
when HTTP_REQUEST {
if { [active_members poolA] < 1 } {
use pool poolB
HTTP::redirect "/splash.html"
}
}
Essentially I want the HTTP::host to be the same. I don't really care of the uri, whether the user sees the splash.html or not.
Can anyone point out what I'm doing wrong please?
Thanks in advance.
Ken
20 Replies
Sort By
- Chris_Miller
Altostratus
HTTP::redirect sends the user an actual redirect. In your case, you're sending them to poolB but then redirecting them right to /splash. Redirects require protocol, hostname, and uri. So, "http://[HTTP::host]/splash.html" for example. - kng_107168
Nimbostratus
splash.html is a static page with our maintenance hours. It is hosted on another web server in our private LAN. And I have put that web server into a separate pool. In my example, that would be poolB. - Chris_Miller
Altostratus
Gotcha...yes, that makes sense. Try this.when HTTP_REQUEST { if { [active_members poolA] < 1 } { pool poolB HTTP::uri /splash.html } }
- kng_107168
Nimbostratus
Thanks Chris. I had try this before but the browser doesn't dispaly the splash.html. This seems so simple but it's not working. Very frustrating. - Chris_Miller
Altostratus
If you're using a rule that redirects to HTTPS, then yes, it'll keep this rule from functioning properly. - kng_107168
Nimbostratus
Yes I am forwarding all http to https. The way that I do it is I created a virtual server that accepts connections on port 80. Then it has that https forwarding irule associated to that virtual server. - Chris_Miller
Altostratus
Why not just keep the redirect iRule on the HTTP VIP and do the rule above on the HTTPS one? - kng_107168
Nimbostratus
hmmm if I understand you correctly, this is how I had it setup already. But the redirection is not working. - Chris_Miller
Altostratus
Are you terminating SSL on the LTM? - kng_107168
Nimbostratus
I'm using LTM to off load the SSL load. So I have a SSL profile setup on the LTM. Is that what you are asking?
Recent Discussions
Related Content
DevCentral Quicklinks
* 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
Discover DevCentral Connects