scarpozzi_82104
Dec 09, 2010Nimbostratus
Redirection when clients are at /
I've got a portal server that will be unavailable weekly due to some oracle cold backups. I've got an iRule that sets up the maintenance window and gives me controls to automate the recurring window.
My portal server listens on 80/443 in 2 pools/virtual servers. When the database goes down for backups, I have Apache spin up another instance listening on port 81 for the maintenace page...so I created a maintenance pool.
To handle requests during the maintenace window, the command I have is:
use pool maint_pool
I tested this and it works great. The problem is, when a user is logged into the portal and it goes down for maintenance, they get a 404 because the pool switches out from under them. I need a redirect for established connections and the 'use pool maint_pool' for new connections.
To get what I want, I'm going to need a redirect when the maintenance window is on and the HOST:URI doesn't match portal.site.com. What iRule functions allow you to compare the client URL and do a redirect when it isn't 'portal.site.com' or 'portal.site.com/'
Thanks.