Forum Discussion
Mersin_108215
Jan 30, 2014Nimbostratus
HTTP Respond and Redirect Together
Hi -
I need to be able to send an HTTP 404 along with a redirect. Can this be done?
Why I want to do this...
My OOS page is hosted externally.
Currently I have an iRule that will send a 404 wi...
- Jan 30, 2014
Maybe something like this...
when HTTP_RESPONSE { if { ([HTTP::status] equals "404") } { HTTP::respond 404 content " " } }
IheartF5_45022
Jan 31, 2014Nacreous
Which when added together becomes;-
when HTTP_REQUEST {
set 404_page " "
if {![active_members [LB::server pool]]} {
HTTP::respond 404 content $404_page Edge-Control "bypass-cache" Cache-Control "nocache"
return
}
}
OR
when HTTP_RESPONSE {
set 404_page " "
if { [HTTP::status] == 404} {
HTTP::respond 404 content $404_page Edge-Control "bypass-cache" Cache-Control "nocache"
return
}
}
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