I am trying to work through migrating I-Rule and data group configurations from F5 BIGIP to NGINX. I ran into a snag when trying to mimic functionality we had previously in an I-Rule. Essentially, we have a website with F5 as a reverse proxy. The website product detail page has a specific URL structure to identify different products IE: ProductDetail.aspx?productid=12345. In F5, we have a datagroup with mappings of old productids to new productids IE: 12345 := 67890. We then have a redirect set up that will string replace the old productid with the new one and then redirect the client to the correct product page.
For the life of me I can't figure out how to mimic this on NGINX. I have a map setup with old to new product ID
map $arg_productid $redirect_to
{
22195 91390;
}
I then want to use this to replace the value of the arg productid with the new value and redirect the client. I only want this to be considered if the productid arg contains the source product id from the mapping. Any ideas?
Thanks