Nginx config not working


I want to add rewrite rule for one page. So tried writing following in nginx.conf file. (path of which is /home/frappe/frappe-bench/config/)

location /home {
rewrite home?key=$1 ^/home/([a-zA-z]+)?$;

home page is created under websites module, web page doc.

But this is not working… i.e. /home/AxCcTy/ does not get re-written as home?key=AxCcTy

Am i missing any steps?