Forum Discussion
Ravi_Rajan_7549
Nimbostratus
Aug 02, 2006Redirecting Certain Apps
Hi,
I am quite new to irules and have a query.
I have 15 web applications in my web server. I have requirement that in case of maintenance windows, 10 out of above 15 apps needs to redirected a offline page.
URL is like http://VIP/app1 etc..
So in case URI contains app1/app2... /app15, then i want to redirect this to a offline page. However, if it is /app11,/app12../app15, then these application should work.
Hope i am clear with the explanation.
TIA,
Regards,
Ravi
- hoolio
Cirrostratus
Hello Ravi,class disabled_apps { "app1" "app10" "app2" }
set app_number [getfield [HTTP::uri] "/" 2] if { [matchclass $app_number equals $::disabled_apps] }{ log local0. "App: $app_number. Request from client [IP::remote_addr] for [IP::local_addr][HTTP::uri] was redirected" HTTP::redirect "http://mymaintenancepage.com" }
- Ravi_Rajan_7549
Nimbostratus
Thanks a lot !
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