Forum Discussion
MSK_222682
May 06, 2016Nimbostratus
How to forward the requests to another URL using iRule
Hi, I have a scenario wherein I have to forward all the incoming requests to a virtual server (https://abc.com) to another URL something like https://test.com/o/maintenance.html which hosts the maint...
Yann_Desmarest
May 06, 2016Cirrus
hello,
The best way is to apply the irule for maintenance on the VS directly. for example :
when HTTP_REQUEST {
if { [active_members $default_pool] < 1 } {
HTTP::respond 200 content [ifile get "/Common/maintenance.html"] noserver "Content-Type" "text/html" "Cache-Control" "no-cache, must-revalidate"
}
}
when LB_FAILED {
HTTP::respond 200 content [ifile get "/Common/maintenance.html"] noserver "Content-Type" "text/html" "Cache-Control" "no-cache, must-revalidate"
}
Otherwise, you can use the virtual command (e.g. virtual /Common/my_VS_Name)
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