Using iFiles with iRules - Updating Problem
Hi,
I’ve run into an issue that I cannot seem to find an answer to, so, I’m hoping someone can point me into the right direction.
Basically, I have an iRule that checks if there’s at least 1 active member in my pool. If there’s not at least 1 active member in the pool, the iRule will put up a maintenance page; that maintenance page is an iFile called MaintPage (just a basic html page).
My problem is that if I make a change to the iFile, that update will not register/refresh and continue to use the old version. My workaround has been to edit to the iFile and then remove it from the list (Local Traffic>>iRules : iFile List>>MaintPage) and then add it back in order for it to update. Hope that makes sense…
Here is the iRule for reference:
when HTTP_REQUEST {
switch [HTTP::host] {
"sub.domain.com" {
if { [active_members my-pool] < 1 } {
HTTP::respond 200 content [ifile get MaintPage]
} else {
pool my-pool
}
}
}
}
Thanks again for looking,
Zac
Thanks, I was able to figure this out.
Before, I was using vi to edit the file in "/config/filestore/files_d/Common_d/ifile_d/MaintPage.html" and after I made the update, the page wouldn't reflect the update.
Now, I go into tmsh and enter "edit sys file ifile MaintPage.html" and after I make the changes, the page is updated.
Thanks!