Specific subdirectory redirect to the other URL

Hi all,

I am looking to create an iRule which would redirect users from [ https://www.abc.com/company1 ] to [https://www.xyz.com/company1].

But I don’t want to redirect from [ https://www.abc.com/company2 ].

like this

https://www.abc.com/company1/… ⇒redirect⇒ https://www.xyz.com/company1/…

https://www.abc.com/company2/… ⇒doesn’t redirect

https://www.abc.com/company3/… ⇒doesn’t redirect

https://www.abc.com/… ⇒doesn’t redirect

Currenty I have the F5 Virtual appliance LTM so I am wondering if this is something that the F5 can handle.

Thank you

This is something that can be done with either an iRule or a Local Traffic Policy. Using URI::path you could extract the path component and make a ‘starts_with’ comparison, redirecting in just a subset of potential cases.