Forum Discussion
need help to write an IRULE.
Hello All,
I have two vips configured 148.x.x.228:443 and 148.x.x.228:80.
with 148.177.29.248:80 Irule "when HTTP_REQUEST { HTTP::redirect https://[HTTP::host][HTTP::uri] }" associated to redirect all http request to 148.x.x.228:443
Now i want to create new i rule which i need to associate with pool under VIP 148.x.x.228:443
1-
2-
3-https://order360.jnjgateway.com/eIFU/CustomError.html
if first URL is not working then it must redirect to third URL. if second URLis not workinh then its must redirect to third URL.
can we achieve this with single iRULE.?
Regards Manoj
Try this irule. Hope it will work as per requirement.
when HTTP_REQUEST { if { [active_members [LB::server pool]] == 0 } { HTTP::redirect "https://order360.jnjgateway.com/eIFU/CustomError.html" } else { HTTP::redirect "https://[HTTP::host][HTTP::uri]" } }
- Samir_Jha_52506Noctilucent
Try this irule. Hope it will work as per requirement.
when HTTP_REQUEST { if { [active_members [LB::server pool]] == 0 } { HTTP::redirect "https://order360.jnjgateway.com/eIFU/CustomError.html" } else { HTTP::redirect "https://[HTTP::host][HTTP::uri]" } }
- Manoj_129792Nimbostratus
do i need to define the name of pool in place of "server pool".
when HTTP_REQUEST { if { [active_members [LB::Site-148.x.x.x_4001]] == 0 } { HTTP::redirect "; } else { HTTP::redirect "https://[HTTP::host][HTTP::uri]" } }
- Samir_Jha_52506Noctilucent
No need to define pool name, it will take default pool which is tagged to VIP. If you want then use below option.
if { [active_members POOL-NAME] == 0 }
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