Forum Discussion
need help to combine new irule with original
need help adding second (bottom irule) into master irule (top irule). ...FYI default pool for vip is IIS_ECM.SWBC.com_pool
Should proccess section with /payment???? and sent uri path to pool IIS_ECM.SWBC.com_pool.
Then else proccess new irule section and send to pool Test-SWBC-Migration1.
Then follow the elseif to focusenet and if nothing else pool IIS_SWBC.com_pool
! below are my irule.
----------------------------------------
This is the original master rule
when HTTP_REQUEST {
if { ([string tolower [HTTP::host]]) equals "www.swbc.com" and
([string tolower [HTTP::uri]] contains "paymentprocessorv3") ||
([string tolower [HTTP::uri]] contains "paymentprocessorakc") ||
([string tolower [HTTP::uri]] equals "/paymentprocessorv3/creditcard.asmx") ||
([string tolower [HTTP::uri]] equals "/paymentprocessorv3/creditcard.asmx?wsdl") ||
([string tolower [HTTP::uri]] equals "/paymentprocessorv3/ach.asmx") ||
([string tolower [HTTP::uri]] equals "/paymentprocessorv3/ach.asmx?wsdl") ||
([string tolower [HTTP::uri]] equals "/paymentprocessorakc/ach.asmx") ||
([string tolower [HTTP::uri]] equals "/paymentprocessorakc/ach.asmx?wsdl") ||
([string tolower [HTTP::uri]] equals "/paymentprocessorakc/creditcard.asmx") ||
([string tolower [HTTP::uri]] equals "/paymentprocessorakc/creditcard.asmx?wsdl") } {
pool IIS_ECM.SWBC.com_pool
}
elseif { [string tolower [HTTP::host]] equals "www.swbc.com" and [string tolower [HTTP::uri]] equals "/holtcat" } {
HTTP::redirect https://focusnet.swbc.com/fnFProvid...efitType=N
}
else {
pool IIS_SWBC.com_pool
}
}
---------------------------------------------------------------------------------------------------------------------------------------------------------
This is the new irule i need to merge with the original master irule
when HTTP_REQUEST {
switch -glob [string tolower [HTTP::path]] {
"/akcelerant/" -
"/idsakcelerant/" -
"/idsakcelerantmtg/" -
"/lmakcelerant/" {
pool Test-SWBC-Migration1
}
}
2 Replies
- uni
Altocumulus
Your request is not very clear to me. Should the new code only be executed for host www.swbc.com? That is what I have assumed below.
I don't know what you are asking when you mention "/payment????"
The lines I have commented out are superfluous, because the first two cases will always pick them up.when HTTP_REQUEST {if { ([string tolower [HTTP::host]]) equals "www.swbc.com" {
switch -glob -- [string tolower [HTTP::uri]] {
"*paymentprocessorv3*" -
"*paymentprocessorakc*"
"/paymentprocessorv3/creditcard.asmx" -
"/paymentprocessorv3/creditcard.asmx?wsdl" -
"/paymentprocessorv3/ach.asmx" -
"/paymentprocessorv3/ach.asmx?wsdl" -
"/paymentprocessorakc/ach.asmx" -
"/paymentprocessorakc/ach.asmx?wsdl" -
"/paymentprocessorakc/creditcard.asmx" -
"/paymentprocessorakc/creditcard.asmx?wsdl"
{
pool IIS_ECM.SWBC.com_pool
}
"/holtcat" {
HTTP::redirect https://focusnet.swbc.com/fnFProvid...efitType=N
}
"/akcelerant/" -
"/idsakcelerant/" -
"/idsakcelerantmtg/" -
"/lmakcelerant/" {
pool Test-SWBC-Migration1
}
else {
pool IIS_SWBC.com_pool
}
}
}
}
- Gill_32697
Nimbostratus
Thank you Stephen. I guess i didn't explain correctly. This irule will execute on vip for swbc.com
Basically I have two irules I need to merge.
If the http request contains any one the Payment string then use
pool IIS_ECM.SWBC.com_pool
if it contains /holtcat
then go to node https://focusnet.swbc.com/fnFProvid...efitType=N
else if string contains
"/akcelerant/"
"/idsakcelerant/"
"/idsakcelerantmtg/"
"/lmakcelerant/"
then use pool Test-SWBC-Migration1
anything else
use pool IIS_SWBC.com_pool
It looks like the sample should work. I understand the comment out because first two line will catch. These two I rules are from separate vips that I need to merge into a new virtual to handle both.
Thank you for your help
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* 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