Shah_83712
May 17, 2010Nimbostratus
Covert a 4.x irule to 10.x irule
Below is the some 4.x irule i need converted to 10.x can some one help please? Also please understand I am brand new to F5 so please post as detailed as possible.
Number 1 Rule:
if (http_uri starts_with "/privacy.asp") { if (http_uri == "/privacy.asp?lang=en") { redirect to "http://uk.mysurvey.com/index.cfm?" + "action=Main.lobbyGeneral&myContent=PRIVACYPOLICY" } else { if (http_uri starts_with "/privacy.asp?lang=") { redirect to "http://" + findstr(http_uri, "lang=", 5, 2) + ".mysurvey.com/index.cfm?" + "action=Main.lobbyGeneral&myContent=PRIVACYPOLICY" } else { redirect to "http://uk.mysurvey.com/index.cfm?" + "action=Main.lobbyGeneral&myContent=PRIVACYPOLICY" } } } else { use pool MAPSYS2.2 }
Number 2 Rule:
if (client_addr == 10.1.0.0 netmask 255.255.255.0) { use pool centurion1 } else { redirect to "http://maintenance.tns-global.com" }
Number 3 Rule:
if (http_uri contains "maint_mode.htm") { redirect to "http://206.104.153.202/maint_mode.htm" } else { if (client_addr == 10.1.0.0 netmask 255.255.0.0 and client_addr != 10.1.14.252 netmask 255.255.255.255) { if (server_addr == 206.104.153.110 netmask 255.255.255.255) { use pool NEW_CLUSTER_HTTP } else { use pool fun_http } } else { if (http_uri contains "msas.cfm") { if (http_uri matches_regex "[sS][uU][rR][vV][eE][yY][sS]") { redirect to "http://206.104.153.202/msas1.htm" } else if (http_uri matches_regex "[Aa][Ll][Ee][Rr][Tt]") { redirect to "http://206.104.153.202/msas2.htm" } else { redirect to "http://206.104.153.202/msas3.htm" } } else { redirect to "http://206.104.153.202/maint.htm" } } }