Forum Discussion
DJ_23086
Altocumulus
Mar 04, 2008Conditional respond/redirect
I'm not sure this is possible, but it sounds doable.
I have a requirement to implement a ONCE-OFF prompt/page generated by the bigip, after which the user is forwarded on to whichever URL ...
Nicolas_Menant
Employee
Mar 04, 2008hi,
you should try something like this:
when CLIENT_ACCEPTED {
set respond 0
}
when HTTP_REQUEST {
if {$respond eq "0"} {
set respond 1
HTTP::respond 200 content \
"\
\
Blah\
\
\
\
Bigip response page
\
Redirection in 5 seconds
\
\
"
}
}
CLIENT_ACCEPTED is triggered when the TCP handshake is done and so process only once
For your response code i trusted you ^^
this code will make the user have on its first request your prompt page
For having the user being redirected after he received the prompt page you'll need to handle this within your web page not with the BIGIP, it won't work
When you do the HTTP::respond then consider that everything after like the HTTP::redirect won't happen.
You'll need some code like this:
CodeAve.com( Timed Redirect on Page Load)
This page contains an onload command that will redirect the browser
to Yahoo! ten seconds after the page has loaded
Here is an example Click here
So it would give something like:
when CLIENT_ACCEPTED {
set respond 0
}
when HTTP_REQUEST {
if {$respond eq "0"} {
set respond 1
HTTP::respond 200 content \
"\
\
Your message\
If it doesn't work click \
"
}
}
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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
