cxcal_18687
Nimbostratus
Jan 25, 20114.xto 10.x iRules
Is there any clean way of converting 4.x iRules to 10.x ?
Any help would be appreciated.
rule attnow {
redirect to "https://%h/%u"
}
rule actt_redirect {
if (http_uri == "/") {
redirect to "https://inc.com/actt/"
}
else {
redirect to "https://inc.com/%u"
}
}
rule MEVSNET {
if (http_host == "inc.com" and http_header("WL-Proxy-SSL") != "true") {
redirect to "https://inc.com/%u"
}
else if (http_host == "inc.com" and http_uri ends_with "/") {
redirect to "https://inc.com/index.html"
}
else if (http_host == "www.snet.com" and http_uri ends_with "/") {
redirect to "https://www.snet.com/index.html"
}
else if (http_host == "inc.com" and http_uri ends_with "/") {
redirect to "https://www.inc.com/index.html"
}
else if (http_host == "snet.com" and http_header("WL-Proxy-SSL") != "true") {
redirect to "https://www.snet.com/%u"
}
else if (http_host == "www.snet.com" and http_header("WL-Proxy-SSL") != "true") {
redirect to "https://www.snet.com/%u"
}
else if (http_host == "192.199.99.104") {
discard
}
else {
use pool SNET
}
}
rule Direct {
if (http_header("WL-Proxy-SSL") == "true" and (http_uri ends_with "router/t_fileupload" or http_uri ends_with "router/p_fileupload")) {
redirect to "https://inc.com/router/t_fileupload"
}
else if (http_header("WL-Proxy-SSL") != "true" and (http_uri ends_with "router/t_fileupload" or http_uri ends_with "router/p_fileupload")) {
redirect to "http://inc.com/router/error"
}
else if (http_header("WL-Proxy-SSL") != "true" and http_uri ends_with "/") {
redirect to "https://inc.com/edidirect/"
}
else if (http_header("WL-Proxy-SSL") != "true") {
redirect to "https://192.199.99.107/%u"
}
else {
use pool Direct
}
}