Hi all I am trying to get the following irule to work. Forgive me if it doesnt make sense as this is all new to me.
Ideally it should check whether a custom ifile should be served if it exists otherwise serve the default maintenance ifile. However I get stuck with a TCL error when there is no custom ifile and it never completes the statement to server the default maintenance page:
TCL error: /Common/IIS_maint - iFile IIS_websitename_pl not found (line 10) invoked from within “ifile get $myfile”
when HTTP_REQUEST {
set $myfile to the name of the desired iFile found in the data-group IIS_DG
ifile must match the name of the pool
set myfile [class match -value [string tolower [HTTP::host]] equals IIS_DG ]
log local0. "Maint iRule, MYFILE=$myfile"
if { $myfile ne "" } {
if myfile is not NULL, a valid name:value has been found
server the desired iFile
HTTP::respond 503 content [ifile get $myfile]
} else {
a valid name:value has not been found
serve the default iFile
HTTP::respond 503 content [ifile get IIS_maint_txt] }
}
Any help really appreciated