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...
Kurt_Knochner_5
Nov 02, 2011Cirrus
Thinking about this, maybe an image is a bad example. What other types of request causes a browsers to redirect for if NOT images?
Hi,
please read my first post, then this one!
Here we go... You say:
ONLY need to redirect IF the host URI returns a 404 and nothing else on the connection:"http://nba.qad.com/finals/2011/index.html"
Well, if the browser get's a 404 for the main page (the one that contains the references to all other parts), it will have no HTML code to parse and thus no idea what to load. So, no images, no css, no nothing. The whole game ends there.
In this connection, there will be many requests in the html page (references to images, js, css, etc.)
Yes, but the browser will not know that, as the main page (the one that contains the HTML code with the references to all other parts) returned 404.
IF all the reference requests to images, js, css, etc. returns a 404, the browser
should NOT redirect, but ONLY when the (1 in screenshot) "index.html" itself
returns a 404.
The browser will not be able to load the images, js, css, etc. as there is no information about that!
Again, maybe I don't fully understand what you want to do.
Regards
Kurt Knochner
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