Apache1048_5684
Sep 26, 2017Nimbostratus
Irule based on host name contains to redirect
I am working with Peppol and need an irule that will redirect based on a wildcard URL
The URL will end with ".publisher.edelivery.tech.ec.europa.eu" and the beginning could be any string. Ours
elcom-smp-test.publisher.edelivery.tech.ec.europa.eu
So far I have tried multiple combinations of ends_with and contains but no joy. We use
when HTTP_REQUEST {
switch [HTTP::host] {
smpdev.elcom.com { pool smpdev-pool }
smpqa.elcom.com { pool smpqa-pool }
smptest.elcom.com { pool smptest-pool }
elcom-smp-test.publisher.edelivery.tech.ec.europa.eu { pool smptest-pool }
default { reject }
}
}
but I need the last line to match the last portion (publisher.edelivery.tech.ec.europa.eu) of the host name - is that possible?