Forum Discussion
Pav_70755
Oct 20, 2010Nimbostratus
HTTP Re-Direct with html holding page
I have a standard HTTP re-direct in place and want to know how I can incorporate a HTML holding page before it re-directs.
hooleylist
Aug 16, 2011Cirrostratus
Hi Pav,
Can you try this?
You may need to edit this line if the forum code HTML encodes the ampersand:
if { [HTTP::uri] ends_with "/default.asp?File=pressdetail&id=87" } {
when CLIENT_ACCEPTED {
Start of HTML
Save the HTML here with support for variables
set html [subst -nocommands {
JAN
We've Moved!
Temp holding page Temp
You will automatically be redirected in 5 seconds.
Alternatively, you can visit Temp now
© Temp & , Inc.
}]
End of HTML
}
Un-comment the following lines if the site uses SSL
when CLIENT_ACCEPTED priority 501 {
TCP::collect 5
}
when CLIENT_DATA {
if { [matchclass [TCP::payload] starts_with $::http_methods] } {
SSL::disable
}
}
when HTTP_REQUEST {
if { [TCP::local_port] == 80 } {
persist source_addr 1800
HTTP::fallback http://support.com/
set dtime 3
Un-comment the next 3 lines for redirects and expand out with elseif's if needed
if { [HTTP::uri] ends_with "/default.asp?File=pressdetail&id=87" } {
HTTP::respond 200 content $html
} else {
pool Web_Farm_Front
Un-comment the net line if using redirects
}
} elseif { [TCP::local_port] == "443" } {
HTTP::header insert "BPL-SSL" "On"
pool Web_Farm_Front
} else {
set srvr [findclass [TCP::local_port] $::Individual_Servers " "]
if { $srvr ne "" } {
node $srvr 80
} else {
Replace HTTP://sitename with the default URL of the site
HTTP::redirect "http://www.domain.net/"
}
}
}
Aaron
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