Permanent Redirect

Maxim Dounin mdounin at
Tue Apr 20 19:06:07 MSD 2010


On Tue, Apr 20, 2010 at 04:43:19PM +0200, Nick Weisser wrote:

> Hi there,
> I'm trying to permanently redirect from various outdated URLs to the
> domain's home page like so:
> location /phpshop {
>   rewrite ^ permanent;
> }
> which results e.g. in
> to be rewritten to
> which kind of makes sense, but I need to strip those parameters
> (page and product_id), too.
> Any ideas on how to accomplish this?

rewrite ^ permanent;

(note "?")

It should be here:

But it looks like rewrite directive description was polluted by 
lots of semi-related user notes and currently unreadable.  Sombody 
has to throw/move them all away and re-translate original docs.

To all: please keep module docs / directive descriptions close to 
original docs if possible.  If you think that something should be 
noted - add trailing note clearly separate from documentation, or 
even add it on separate wiki page.

Maxim Dounin

More information about the nginx mailing list