Got it work but looking for a better solution maybe

Hello,
I have an old urls that i want to transfer to homepage. :
http://www.mysite.com/Recherche.html?searchword=dummy+key

what i did and it’s working (however i would be curious to know the
proper way…)

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.
Tahnks and regards.
Yaz

Posted at Nginx Forum:

On 7/29/11, yaz [email protected] 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;
}

Hmm i have this error while doing this
Restarting nginx: nginx: [emerg] unknown directive “localtion”

Posted at Nginx Forum:

ok got it wrong spelling

Posted at Nginx Forum: