Got it work but looking for a better solution maybe...

Alexandr Gomoliako zzz at zzz.org.ua
Thu Jul 28 23:08:18 UTC 2011


On 7/29/11, yaz <nginx-forum at nginx.us> wrote:
> I have an old urls that i want to transfer to homepage. :
> http://www.mysite.com/Recherche.html?searchword=dummy+key

> if ($arg_searchword) {
> rewrite ^ $uri? permanent;
> }
> rewrite ^/Recherche.html http://www.mysiter.com/ permanent;

> Can i make this in one shot ? to redirect such URL ? Here it is done two
> steps.

localtion = /Recherche.html {
    rewrite ^ http://www.mysiter.com/ permanent;
}



More information about the nginx mailing list