Welcome! Log In Create A New Profile

Advanced

Re: Permanent Redirect

Maxim Dounin
April 20, 2010 11:10AM
Hello!

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 ^ http://www.my-domain.com permanent;
> }
>
> which results e.g. in
>
> http://www.my-domain.com/phpshop/?page=shop/flypage&product_id=65
>
> to be rewritten to
>
> http://www.my-domain.com?page=shop/flypage&product_id=65
>
> 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 ^ http://www.my-domain.com/? permanent;

(note "?")

It should be here:

http://wiki.nginx.org/NginxHttpRewriteModule#rewrite

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

_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx
Subject Author Posted

Permanent Redirect

Nick Weisser April 20, 2010 10:52AM

Re: Permanent Redirect

Alejandro Mery April 20, 2010 10:56AM

Re: Permanent Redirect

Igor Sysoev April 20, 2010 11:00AM

Re: Permanent Redirect

Maxim Dounin April 20, 2010 11:10AM

Re: Permanent Redirect

Alejandro Mery April 21, 2010 04:34PM

Re: Permanent Redirect

Ray April 25, 2010 09:58AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 273
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready