Forum Discussion
Fadhil_Marus__T
Dec 09, 2010Nimbostratus
landing page
Good day all,
I'm going to create iRule for "landing page", so client when accessing to the network, get the IP address and def gw, and accessing a web page, the F5 will redirect the first attempt to a landing page (F5 as default gateway for client). so when client open browser at the first time (or connect at the first time), for example: www.google.com, F5 will redirect to internal.company.com. After that when user tries again to open www.google.com or other, F5 will not redirect to the landing page, and the real page displayed (www.google.com or other).
We tried to use this irule (based on table wiki):
when HTTP_REQUEST {
set tbl "connlimit:[IP::client_addr]"
if { [table keys -subtable $tbl -count] < 1 } {
log local0. "LANDING $tbl [table keys -subtable $tbl -count]"
table set -subtable $tbl "landing" "ignored" 180
HTTP::respond 302 Location "http://internal.company.com"
log local0. "LANDING $tbl [table keys -subtable $tbl -count]"
event CLIENT_CLOSED disable
} else {
table set -subtable $tbl "landing" "ignored" 180
set timer [after 1000 -periodic { table lookup -subtable $tbl "landing" }]
log local0. "LANDING2 $tbl [table keys -subtable $tbl -count]"
}
}
when CLIENT_CLOSED {
after cancel $timer
log -noname local0. "CLOSED $tbl [table keys -subtable $tbl -count]"
table delete -subtable $tbl "landing"
}
But still there is some miss redirection. after first attempt, the second attempt and random attempt still redirect to the landing page.
Is there any good iRule for this?
Thanks and best regards,
Fadhil
- hooleylistCirrostratusHi Fadhil,
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