Forum Discussion
iaine
Feb 01, 2021Nacreous
OK - so you could either move your html code to a variable and then make a call to it like this
when RULE_INIT {
set static::sorry_code {
<html>
<head>
<title>Maintenance Page</title>
</head>
<body>
<article>
<center><h1 style="color: #000;">
Xin lỗi quý vị, hệ thống đang được bảo trì. Xin quý vị quay lại sau khi bảo trì hoàn tất.</h1> <center>
<div>
<center><h1 style="color: #000;">Xin trân trọng cảm ơn!.<p></p><center>
</center></h1></center></div>
<article>
</body>
</html>
}
}
when HTTP_REQUEST {
if { [active_members [LB::server pool]] == 0 } {
HTTP::respond 200 content $static::sorry_page
}
}
...or you could try moving the html code to an iFile - https://clouddocs.f5.com/api/irules/iFile.html - if there are any strange characters in the html code that is causing a conflict then this method should resolve these issues