Permanent Redirect

Ray gunblad3 at gmail.com
Sun Apr 25 17:53:08 MSD 2010


How about this?

location /phpshop {
    rewrite ^.*$ http://www.my-domain.com permanent;
}

Ray.


On Thu, Apr 22, 2010 at 4:18 AM, openstream <nginx-forum at nginx.us> wrote:

> Hi there,
>
> I'm trying to permanently redirect 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?
>
> Here's my complete virtual host configuration:
>
> http://openstream.pastebin.com/N09mUUef
>
> Any pointers would be very much appreciated.
>
> Cheers, Nick
> Openstream Internet Solutions
> http://www.openstream.ch
>
> Posted at Nginx Forum:
> http://forum.nginx.org/read.php?2,77780,77780#msg-77780
>
>
> _______________________________________________
> nginx mailing list
> nginx at nginx.org
> http://nginx.org/mailman/listinfo/nginx
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://nginx.org/pipermail/nginx/attachments/20100425/35348433/attachment.html>


More information about the nginx mailing list