Forum Discussion
Pankaj_70057
Jan 14, 2013Nimbostratus
LTM Maintenance Page - error
Here is the irule, require to just setup any http request get the maintenance massage:
when HTTP_REQUEST {
HTTP::respond 403 content {
...
nitass
Jan 15, 2013Employee
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 : -
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