Forum Discussion
Apr 25, 2011
Response redirect ONLY if browser URI gives an 404 error
Hello All, How does one redirect to an external URL in the response ONLY if the URI in the browser returns a 404? ex) When you hit a page and the URL in the browser is "http://xyz.co...
Arie
Nov 01, 2011Altostratus
To clarify, I assume that you want the redirect only if the web server returns a 404? You mentioned the browser (client), but it sounds like you want to intercept 404s.
We had this requirement years ago. Digging up some old code, here's how I handled it:
when HTTP_RESPONSE {
if { ([HTTP::status] equals "404") } {
HTTP::redirect ...
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