Convert 302 to internal redirect

Hi

I have the following redirect working for a wordpress install:

rewrite ^/([^/]+)/product/([^/]+)/?$
http://$host/$1/index.php/product?prodname=$2 redirect;

The ‘obvious’ transformation that I have tried is:

rewrite ^/([^/]+)/product/([^/]+)/?$ /$1/index.php/product?prodname=$2
last;

But this results in a WP 404 page.

What nginx-fu am I missing?

Posted at Nginx Forum:

I am silly, it is my own fault. I set the wrong root value in my PHP
location{} block.

Apologies for the noise.

Posted at Nginx Forum: