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

yaz nginx-forum at nginx.us
Thu Jul 28 22:51:20 UTC 2011


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: http://forum.nginx.org/read.php?2,213054,213054#msg-213054



More information about the nginx mailing list