Refine iRule with external class file
I have created an iRule where I pick which servers are used based off URI. IE. if www.mysite.ca/principal go to webnode and if www.mysite.ca/it go to drupal.
One thing I am having trouble with is the format of the external file. does anyone know how to write the rule so that only the excact match to the file is sent. Certain sites start similar , such /it and /italian. Wondering how the file can be written to pick the exact phrase I specify?
The iRule in place is
when HTTP_REQUEST {
if { [class match [HTTP::uri] starts_with DRUPALSITES] } {
pool DRUPAL
} else {
pool WEBNODE }
}
The External File looks like:
/eas,
/esaac,
/economics,
/edtech,
/efchr-events,
/emergency,
/emf,
etc.
I did try /eas/, and that works most of the time but certain sites would break. In this format, most sites append the / ; while others do not, and then i need to manually add the /
So I have opted not to have any trailing /
Anyone deal with a problem like this???
Thanks