Convert 302 to internal redirect

miradev nginx-forum at
Wed Oct 28 17:49:06 MSK 2009


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:,17648,17648#msg-17648

More information about the nginx mailing list