Forum Discussion
Issue facing in Maintainence Page
10.25.133.24:88 is the maintainence page server and we are binding it inside named: maintenance-Pool
Our Irule is not working when attached:
when HTTP_REQUEST { set host [HTTP::host] } when HTTP_RESPONSE { if { [HTTP::status] eq "404" } { HTTP::redirect http://$host/apologies/apologies.htm pool Maintenance-Pool return } elseif { [HTTP::status] eq "400" } { HTTP::redirect http://$host/apologies/apologies.htm pool Maintenance-Pool return } }
Thanks and Regards PZ
14 Replies
- R_Eastman_13667Historic F5 Account
Try this:
when HTTP_REQUEST priority 200 { set host [HTTP::host] } when HTTP_RESPONSE priority 200 { if {[HTTP::status] == 404} { HTTP::redirect http://$host/apologies/apologies.htm return } elseif {[HTTP::status] == 400} { HTTP::redirect http://$host/apologies/apologies.htm return } } - Parveez_70209
Nimbostratus
The above is not working, kindlu suggest how can we make thiswork.
- R_Eastman_13667Historic F5 AccountWhat error message are you receiving?
- Parveez_70209
Nimbostratus
So, you mean manually we need to add the same apology-server into the same pool with the aplication servers and apply the maintainence-IRULE ?
Can you suggest pointing using the Maintainence-Pool
- nitass
Employee
you want to respond maintenance page when server returns 4xx code, don't you?
if yes, is example in HTTP::retry wiki helpful?
HTTP::retry
https://devcentral.f5.com/wiki/iRules.HTTP__retry.ashx - Arnaud_Lemaire
Employee
Hello Parveez,
basically you cannot select a pool based on a server response code like Status, as you have already forwarded you connection to a pool and received the response, you are done with the load balancing part.
you can either select one of the option community sent you before, using retry irule or directly send the redirect page. Alternative would be to create a maintenance pool virtual server and using the redirection to that one.
- Parveez_70209
Nimbostratus
Hi All,
Sorry for confusing all.
Kindly allow me to explain one more time:
- We have one Internal Apology application-server(serving the Apology-Page) which can be accessible via http://xyz.gems.com:88/apologies/apologies.htm
- Apology application-server xyz.gems.com:88 is binded into a Pool named Maintainence-Pool.
- How can I write an Irule calling the Maintainence-Pool and which includes /apologies/apologies.htm as the Apology application-server contains extension as /apologies/apologies.htm(as mentioned above).
My idea is to add that single Irule to all my environments and it should work. Kindly guide me please, struck into this.
Thanks and Regards PZ
- Parveez_70209
Nimbostratus
Kindly guide please.
Thanks and Regards PZ
- Arnaud_Lemaire
Employee
Use HTTP::uri to set the destination uri and pool To sélect your maintenance pool
- Parveez_70209
Nimbostratus
Hi Arnaud,
Extremely sorry Sir, basically new to this, can you please assist me in editing or writing the same for me, I will keep the same as a reference to understand the Irules.
Thanks and Regards PZ
- Parveez_70209
Nimbostratus
Hi Suggestion please.
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* 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