Forum Discussion
Mar 10, 2015
Hi Dave,
an iRule to handle this request would look like this:
when HTTP_REQUEST {
if {([string tolower [HTTP::host]] equals "ecms.epa.gov") and
(([string tolower [HTTP::path]] equals "/erma/login.htm") and
([string tolower [HTTP::query]] contains "action=search"))} {
HTTP::redirect "http://ecms.epa.gov/erma2/login.htm?action=search"
return
}
}
It will check the host-header, the path and the query (URI includes path and query separated by question mark).
For a match it will redirect the client.
In case of no match it will proceed and end up with the default action i.e. leaving it to the virtual server to forward to the default pool.
Thanks, Stephan
2015-03-11: Edited according to Arie´s advice.