Forum Discussion
John_Lennon_457
Nimbostratus
Mar 22, 2010Redirection to HTML error page if no pool selected
I'm new at using a LTM. I'm using ProxyPass V10 - http://devcentral.f5.com/wiki/default.aspx/iRules/ProxyPassV10.html - I wrote a script to convert the almost 1,000 rules from our Reverse Proxy to thi...
hoolio
Cirrostratus
Mar 23, 2010Hi John,
- be redirected to an error.html page when no pool is dynamically selected (I don't have a default pool) regardless of the URL typed
If you set even a dummy default pool, ProxyPass will select it if there isn't a match in the HTTP_REQUEST event for the requested host and/or URI against the ProxyPass datagroup. So you could put your second iRule at a later priority (when HTTP_REQUEST priority 501) and then check if '[LB::server pool] eq $default_pool'. If so, then no match was found in the ProxyPass iRule and you could then send a redirect to an error URL.
- be redirected to an error.html page when the user types a wrong URL and the web server doesn't return any response
I can't think of a way to handle this if the server sends no HTTP response for an invalid request. Conceptually, you could try to increment a counter on each HTTP request, decrement the counter on each response and then look for an incremented count when the server closes the connection. However, you cannot send an HTTP response from the SERVER_CLOSED event. So I'm not sure this is possible.
Can you change the server behavior to send a 404 or any other specific status?
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