Forum Discussion
Tosin_Omojola
Oct 25, 2016Altostratus
This is the final solution that worked:
I created another VS 10.10.1.60 ( and a subdomain that points to the IP) and added this iRule to it:
when HTTP_REQUEST {
set referrer_host [URI::host [HTTP::header value Referer]]
if { ($referrer_host ne "") and ($referrer_host eq "click.sbank.com") } {
if { [string tolower [HTTP::uri]] ends_with "/eod" } {
HTTP::redirect "http://pam.banks.com/eod"
} elseif { [string tolower [HTTP::uri]] ends_with "/" }{
HTTP::redirect "http://pam.bank.com"
}
} else { HTTP::redirect "http://click.bank.com/index.php?resp_id=MLG"}
}
Then, on the main VS hosting the resource pam.banks.com, the normal iRule remains.
when HTTP_REQUEST {
if { [string tolower [HTTP::uri]] ends_with "/eod" } {
HTTP::redirect "http://10.10.1.51:9001/forms/frmservlet?config=ref&serveruserparams=NLS_LANG=AMERICAN_AMERICA.AR8MSWIN1256&otherparams=P_WST_LAN_IND=1+P_BANKS_APP_URL=http://10.10.1.51:9001/banks"
} elseif { [string tolower [HTTP::uri]] ends_with "/" }{
HTTP::redirect "http://pam.bank.com:9001/forms/frmservlet?config=ref&serveruserparams=NLS_LANG=AMERICAN_AMERICA.AR8MSWIN1256&otherparams=P_WST_LAN_IND=1+P_BANKS_APP_URL=http://10.10.1.57:9001/banks"
}
}
That delivers the desired solution...