using two irules in VS
So we currently have a single large irule on a website. Website will be down for maintenance over the weekend. Need a Sorry maint page redirect for external clients but normal processing for internal testing. So if I add the 1st iRule to the VS to redirect external traffic, the internal traffic not be affected by 1st irule and would continue with 2nd normal irule, correct? In other words, traffic hits 1st if IP is external you get redirect, if IP is internal 1st iRule skips and 2nd iRule is applied....see below. !
1st iRule
! when HTTP_REQUEST { if { [IP::addr [IP::client_addr] equals 10.0.0.0/8] } { nothing to do, bypass and process 2nd iRule } else { HTTP::redirect "https://www.mysite.com/Portals/0/Documents/Learn/LPCFAQs /mocket.png?ver=2016-06-06-090820-970×tamp=14655037dr5494" } }
!=======
! 2nd iRule ! when HTTP_REQUEST { if {[string tolower [HTTP::host]] eq "mysite.com" } { HTTP::redirect "https://www.mysite.com[HTTP::uri]" } elseif { ([string tolower [HTTP::host]]) contains "mysite.com" } { switch -glob -- [string tolower [HTTP::uri]] { "payment3" - "*paymentpakc" { pool PayPool_1 } "/hotcat" { HTTP::redirect "https://paynets.my2site.com/fnFProvider/fnFProvider.asp? app=HCEnrollment&wanted=BESTONFIRM&BeneforYear=2011&BenefitType=N" } "/autodiscover/autodiscover.xml" { HTTP::redirect "https://optoutcover.my3site.com/AutoDiscover/AutoDiscover.xm ! ! truncated