i am not sure why this iRule create issue to maintenance massage iRule. have you checked /var/log/ltm? i understand you would get "Multiple redirect/respond invocations not allowed" error message.
[root@ve10:Active] config b virtual bar80 list
virtual bar80 {
destination 172.28.19.252:80
ip protocol 6
rules {
myrule
myredirect
}
profiles {
http {}
tcp {}
}
}
[root@ve10:Active] config b rule myrule list
rule myrule {
when HTTP_REQUEST priority 100 {
log local0. "-"
HTTP::respond 200 content {This website is currently under scheduled maintenance until 8AM CST on 1/19/2013!}
}
}
[root@ve10:Active] config b rule myredirect list
rule myredirect {
when HTTP_REQUEST priority 200 {
log local0. "-"
HTTP::redirect "https://[getfield [HTTP::host] : 1][HTTP::uri]"
}
}
[root@ve10:Active] config tail -f /var/log/ltm
Jan 15 15:04:11 local/tmm info tmm[4884]: Rule myrule : -
Jan 15 15:04:11 local/tmm info tmm[4884]: Rule myredirect : -
Jan 15 15:04:11 local/tmm err tmm[4884]: 01220001:3: TCL error: myredirect - Operation not supported. Multiple redirect/respond invocations not allowed (line 1) invoked from within "HTTP::redirect "https://[getfield [HTTP::host] : 1][HTTP::uri]""
after adding event disable command to irule, there is no error anymore.
event Wiki
https://devcentral.f5.com/wiki/iRules.event.ashx
[root@ve10:Active] config b rule myrule list
rule myrule {
when HTTP_REQUEST priority 100 {
log local0. "-"
HTTP::respond 200 content {This website is currently under scheduled maintenance until 8AM CST on 1/19/2013!}
event HTTP_REQUEST disable
}
}
[root@ve10:Active] config tail -f /var/log/ltm
Jan 15 15:05:35 local/tmm info tmm[4884]: Rule myrule : -